Description of problem: Running "service dhcpd reload" doesn't output an error message, but also doesn't reload the DHCP configuration file. Version-Release number of selected component (if applicable): dhcp-3.0.5-18.el5 How reproducible: always Steps to Reproduce: 1. make changes in /etc/dhcpd.conf 2. run "service dhcpd reload" Actual results: The changes in /etc/dhcpd.conf are not reloaded, and no error message is printed. Expected results: Either /etc/init.d/dhcpd should restart the DHCP daemon to activate the changes, or it should print an error message, telling the user that "reload" is not implemented. Additional info: The script sets the exit code to 3 when it encounters the "reload" parameter, but that doesn't help much when you call it manually.
'reload' is not supported by dhcpd. You have to stop the service and start it again, or use 'restart'. Status code 3 means the feature you tried is unimplemented: http://intranet.corp.redhat.com/ic/intranet/InitscriptsSpec.html However, what I should be doing is just catching 'reload' and 'try-restart' in the * block so the user gets the usage information and 3 is returned by the script.
Super easy fix: Index: dhcpd.init =================================================================== RCS file: /cvs/dist/rpms/dhcp/RHEL-5/dhcpd.init,v retrieving revision 1.17 diff -u -p -r1.17 dhcpd.init --- dhcpd.init 16 Jul 2008 00:03:39 -0000 1.17 +++ dhcpd.init 17 Apr 2009 01:15:24 -0000 @@ -119,9 +119,6 @@ case "$1" in stop ; start RETVAL=$? ;; - try-restart|reload) - RETVAL=3 - ;; condrestart) if [ -f $lockfile ]; then stop ; start
This request was evaluated by Red Hat Product Management for inclusion in a Red Hat Enterprise Linux maintenance release. Product Management has requested further review of this request by Red Hat Engineering, for potential inclusion in a Red Hat Enterprise Linux Update release for currently deployed products. This request is not yet committed for inclusion in an Update release.
QA, Can I get a qa ack or nak on this? It's a really simple change to the init scripts for dhcpd and dhcrelay. If you pass 'reload' or 'try-restart' to the init script for either service, it should display the usage information and the exit code should be 3. That's what this fix will bring in (right now it only sets the return code, you don't get a usage screen).
Fixed in dhcp-3.0.5-20.el5 and later.
Verified with dhcp-3.0.5-21.el5 [root@gs-bl460cg1-01 ~]# service dhcpd reload; echo $? Usage: /etc/init.d/dhcpd {start|stop|restart|condrestart|configtest|status} 3 [root@gs-bl460cg1-01 ~]# service dhcpd try-restart; echo $? Usage: /etc/init.d/dhcpd {start|stop|restart|condrestart|configtest|status} 3 [root@gs-bl460cg1-01 ~]# service dhcrelay reload; echo $? Usage: /etc/init.d/dhcrelay {start|stop|restart|condrestart|configtest|status} 3 [root@gs-bl460cg1-01 ~]# service dhcrelay try-restart; echo $? Usage: /etc/init.d/dhcrelay {start|stop|restart|condrestart|configtest|status} 3
An advisory has been issued which should help the problem described in this bug report. This report is therefore being closed with a resolution of ERRATA. For more information on therefore solution and/or where to find the updated files, please follow the link below. You may reopen this bug report if the solution does not work for you. http://rhn.redhat.com/errata/RHBA-2009-1331.html