If one messes with his syslog-ng config file, and runs "/etc/init.d/syslog-ng reload", everything appears to be working correctly. However, if the syslog-ng.conf file contains errors, the following situation will happen: root@pts/5 syslog-ng # /etc/init.d/syslog-ng reload * Reloading configuration and re-opening log files... [ ok ] root@pts/5 syslog-ng # /etc/init.d/syslog-ng restart * Shutting down atd... [ ok ] * Stopping firewall... [ ok ] * Stopping vixie-cron... [ ok ] * Stopping syslog-ng... [ ok ] * Starting syslog-ng... parse error at 24 Parse error reading configuration file, exiting. (line 24) * Failed to start syslog-ng [ !!] Thus, the firewall will remain inactive until it is started manually again. Reproducible: Always Steps to Reproduce: Expected Results: * syslog-ng being restarted without stopping all services first (or at least iptables) * the reload option giving information about syntax errors in the config file
could you try to change need logger to use logger in /etc/init.d/firewall
I've changed depend section of the /etc/init.d/iptables script into: depend() { use logger need net } This seams to work! The firewall won't be stopped, only vixie-cron and atd are stopped if syslog fails to reload. It also solves another issue I had today: If the syslog-ng.conf file had errors, the iptables didn't start at boot time because it's dependencies didn't start successfully. When I issue a "/etc/init.d/syslog-ng reload" at the console, syslog does seam to drop a message (a second later) if there is an syntax error. I don't know why this didn't happen before, because I can't reproduce it.
The latest version of the syslog-ng init script checks the syntax of the file before killing syslog-ng so at least you find out about the issue sooner.
I just upgraded syslog-ng and on giving it a #/etc/init.d/syslog-ng restart command, it seam to stop several services but not start them again. Exiting: Nothing left to do; exiting. :) merc ~ # /etc/init.d/syslog-ng restart * Re-caching dependency info (mtimes differ)... [ ok ]ing fcron... [ ok ]ing Usermin... [ ok ]ing Webmin... [ ok ]ing syslog-ng... [ ok ]ing syslog-ng... merc ~ # /etc/init.d/webmin status * status: stopped merc ~ # /etc/init.d/usermin status * status: stopped merc ~ # /etc/init.d/fcron status * status: stopped Is this a correct behave or is it wrong to use the restart command?
OT: Btw when I have it upfront, I always been puzzled why [OK] is overwriting the start of result prompt when restarting someting in init.d/ - anyone?
I'm going to mark this bug invalid because the situation you describe is doing everything correctly from a dependency point of view. Since the init scripts claim to require a system logger, if you shut down the system logger, you must shut down the services that require it. There could be a problem with the dependencies in the init scripts of some packages but those need separate bugs. You can avoid the situation by using /etc/init.d/syslog-ng checkconfig to verify that the config is correct before you attempt to restart syslog-ng.