[Bug 646875] New: Can incorrectly think that dhcpd is already running with pidfile existing but commandline not existing
https://bugzilla.novell.com/show_bug.cgi?id=646875 https://bugzilla.novell.com/show_bug.cgi?id=646875#c0 Summary: Can incorrectly think that dhcpd is already running with pidfile existing but commandline not existing Classification: openSUSE Product: openSUSE 11.3 Version: Final Platform: x86-64 OS/Version: openSUSE 11.3 Status: NEW Severity: Minor Priority: P5 - None Component: Other AssignedTo: bnc-team-screening@forge.provo.novell.com ReportedBy: frank@bushlife.com.au QAContact: qa@suse.de Found By: --- Blocker: --- User-Agent: Mozilla/5.0 (Macintosh; U; Intel Mac OS X 10.6; en-GB; rv:1.9.2.10) Gecko/20100914 Firefox/3.6.10 When issuing the command "service dhcpd restart" an error can occur if the pid file is in existence but the /proc/<pid>/cmdline file is not present. In this situation the /etc/init.d/dhcpd script outputs an error message indicating that grep on line 226 can not find the specified file. The existing line of if test -n "$p" && grep -qE "^${DAEMON_BIN}" "/proc/$p/cmdline" ; then should be changed to if test -n "$p" -a -e /proc/$p/cmdline && grep -qE "^${DAEMON_BIN}" "/proc/$p/cmdline" ; then The error output is: netman:/usr/lib/nagios/plugins # service dhcpd restart Shutting down ISC DHCPv4 4.x Server done Starting ISC DHCPv4 4.x Server grep: /proc/29662/cmdline: No such file or directory [chroot] done Making the change removes the misleading error message. Reproducible: Always Steps to Reproduce: 1.service dhcpd restart 2. 3. Actual Results: netman:/usr/lib/nagios/plugins # service dhcpd restart Shutting down ISC DHCPv4 4.x Server done Starting ISC DHCPv4 4.x Server grep: /proc/29662/cmdline: No such file or directory [chroot] done Expected Results: netman:/usr/lib/nagios/plugins # service dhcpd restart Shutting down ISC DHCPv4 4.x Server done Starting ISC DHCPv4 4.x Server [chroot] done -- 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.
https://bugzilla.novell.com/show_bug.cgi?id=646875 https://bugzilla.novell.com/show_bug.cgi?id=646875#c wei wang <wewang@novell.com> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |wewang@novell.com AssignedTo|bnc-team-screening@forge.pr |mt@novell.com |ovo.novell.com | -- 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.
https://bugzilla.novell.com/show_bug.cgi?id=646875 https://bugzilla.novell.com/show_bug.cgi?id=646875#c Marius Tomaschewski <mt@novell.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|NEW |ASSIGNED -- 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.
https://bugzilla.novell.com/show_bug.cgi?id=646875 https://bugzilla.novell.com/show_bug.cgi?id=646875#c1 Marius Tomaschewski <mt@novell.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|ASSIGNED |RESOLVED Resolution| |FIXED --- Comment #1 from Marius Tomaschewski <mt@novell.com> 2010-11-02 10:40:04 UTC --- Thanks, for the report! Fixed adding missed -s option to grep: - if test -n "$p" && grep -qE "^${DAEMON_BIN}" "/proc/$p/cmdline" ; then + if test -n "$p" && grep -qsE "^${DAEMON_BIN}" "/proc/$p/cmdline" ; then in network:dhcp project and http://download.opensuse.org/repositories/home:/mtomaschewski:/branches:/ope... -- 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.
participants (1)
-
bugzilla_noreply@novell.com