|
From: Michal W. <wei...@se...> - 2005-11-24 12:23:42
|
There is bug in jail script. When jail script trying to add log stream
from jail to syslog-ng config file, there is bad grep pattern defined
and it does not detect already defined stream in syslog-ng.conf. It
means that this stream definition is added again and again. This bug
works just in combination with sagator, due sagator start script does
not have jail stop command defined and unix stream is not removed from
syslog-ng.conf. I really don't know what is worst thing, bur i made this
little patch which works for me :)
diff -urN orig/etc/init.d/jail fixed/etc/init.d/jail
--- orig/etc/init.d/jail 1980-01-01 07:01:01.000000000 +0100
+++ fixed/etc/init.d/jail 2005-11-24 13:18:23.000000000 +0100
@@ -267,7 +267,7 @@
case $SYSLOG_DAEMON in
syslog-ng )
- if [ -z "$(grep "unix-stream(\"$JAILDIR/dev/log\");" /etc/syslog-ng/syslog-ng.conf)" ]; then
+ if [ -z "$(grep "unix-stream(\"$JAILDIR/dev/log\"" /etc/syslog-ng/syslog-ng.conf)" ]; then
sed -e "s|^source src {|source src { unix-stream(\"$JAILDIR/dev/log\" max_connections(1000));|" < /etc/syslog-ng/syslog-ng.conf > /tmp/tmpfile
mv /tmp/tmpfile /etc/syslog-ng/syslog-ng.conf
/etc/init.d/syslog reload
|