https://bugzilla.novell.com/show_bug.cgi?id=480747 Summary: Nagios Control Script Incorrectly Extracts Values from the Nagios Configuration File Classification: openSUSE Product: openSUSE 11.1 Version: Final Platform: x86-64 OS/Version: openSUSE 11.1 Status: NEW Severity: Minor Priority: P5 - None Component: Other AssignedTo: bnc-team-screening@forge.provo.novell.com ReportedBy: marc@mccoombe.net QAContact: qa@suse.de Found By: --- User-Agent: Mozilla/5.0 (X11; U; Linux x86_64; en-US; rv:1.9.0.6) Gecko/2009012700 SUSE/3.0.6-0.1.2 Firefox/3.0.6 During system shutdown, I noticed two error messages (one from chmod and another from chown) when the Nagios service was being stopped. The same problem also happens when the service is being started, or restarted (see Actual Results). It appears that the get_var function in the /etc/init.d/nagios script does not remove the trailing carriage return (\r) from the lines it extracts from the /etc/nagios/nagios.cfg file. Note: Nagios still appears to run without issue. Reproducible: Always Steps to Reproduce: Run /etc/init.d/nagios restart as root user. Actual Results: Shutting down nagios Warning: nagios killedchmod: cannot access `/etc/nagios/resource.cfg\r': No such file or directory chown: invalid user: `nagios\r:nagcmd' done Starting nagios - Error: looks like nagios is still running with PID 11338 - trying to kill previous nagios processchmod: cannot access `/etc/nagios/resource.cfg\r': No such file or directory chown: invalid user: `nagios\r:nagcmd' done Expected Results: Shutting down nagios done Starting nagios done Workaround - Modify the get_var function in the /etc/init.d/nagios script as follows (i.e., change the sed command to also strip-out the carriage return character): # grab a config option function get_var() { if [ -n "$2" ]; then set -- `grep ^$1 $2 | sed 's@=@ @ ; s@\r@@'` else set -- `grep ^$1 $NAGIOS_CFG | sed 's@=@ @ ; s@\r@@'` fi shift # remove first ARG => search-string echo $* } -- Configure bugmail: https://bugzilla.novell.com/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are on the CC list for the bug.