[bug-notifications] [dhcp 0004064]: RFE: Extend init script with a "restart" option

Mantis Bug Tracker noreply at opencsw.org
Thu Dec 10 19:44:15 CET 2009


A NOTE has been added to this issue. 
====================================================================== 
http://www.opencsw.org/mantis/view.php?id=4064 
====================================================================== 
Reported By:                skayser
Assigned To:                bonivart
====================================================================== 
Project:                    dhcp
Issue ID:                   4064
Category:                   packaging
Reproducibility:            N/A
Severity:                   feature
Priority:                   normal
Status:                     assigned
====================================================================== 
Date Submitted:             2009-12-03 13:29 CET
Last Modified:              2009-12-10 19:44 CET
====================================================================== 
Summary:                    RFE: Extend init script with a "restart" option
Description: 
To have dhcpd reload its configuration i currently do

    /etc/opt/csw/init.d/cswdhcpd stop
    /etc/opt/csw/init.d/cswdhcpd start

Could we get a 

    /etc/opt/csw/init.d/cswdhcpd restart

instead? Possibly with configuration file syntax checking before the stop
so that the service is only stopped when the configuration file is sane.
Something like httpd -S (in case dhcpd offers it).
====================================================================== 

---------------------------------------------------------------------- 
 (0007080) skayser (administrator) - 2009-12-10 19:44
 http://www.opencsw.org/mantis/view.php?id=4064#c7080 
---------------------------------------------------------------------- 
FAIL needs some quotes to prevent a syntax error.

diff cswdhcpd.org cswdhcpd
36,38c36,38
<     [ $FAIL = 1 ] && echo "Your configuration seems broken. Exiting."
<     [ $FAIL = 2 ] && echo "Your lease file seems broken. Exiting."
<     [ $FAIL ] && exit 1
---
>     [ "$FAIL" = 1 ] && echo "Your configuration seems broken. Not
restarting."
>     [ "$FAIL" = 2 ] && echo "Your lease file seems broken. Not
restarting."
>     [ "$FAIL" ] && exit 1

Also, I just noticed funny things with SMF on Solaris 10. Even if there is
a restart option, SMF only seems to trigger stop and start.

# svcadm restart cswdhcp
# /var/svc/log/network-cswdhcpd\:default.log
...
[ Dec 10 19:39:59 Stopping because service restarting. ]
[ Dec 10 19:39:59 Executing stop method
("/var/opt/csw/svc/method/svc-cswdhcpd stop") ]
Stopping dhcp.
[ Dec 10 19:39:59 Method "stop" exited with status 0 ]
[ Dec 10 19:39:59 Executing start method
("/var/opt/csw/svc/method/svc-cswdhcpd start") ]
Starting dhcp.
...




More information about the bug-notifications mailing list