Hello,<br><br>i went through a lot of all posts from 2006,2007 and so on and all people says there is no clean way to stop and start the ISC DHCP Server via Omapi. Now 4 years later I hope there will be a solution.<br><br>
I use the follwoing script:<br><br>---------------- truncated ----------------------<br><br>case "$1" in<br>    'start')<br>        echo  "Starting DHCP server $INTERFACEIP "<br>        echo ""<br>
        $DAEMON_BIN $INTERFACE  -lf $LEASE_FILE -cf $CONFIG_FILE<br>        ;;<br><br>    'stop')<br>        echo  "Stopping DHCP server $INTERFACEIP "<br>        echo ""<br>        #Kill and restart dhcpd.<br>
        # if test -s /var/run/dhcpd.pid; then<br>        #What's the current dhcpd process number?<br>        # DHCPPROC=`cat /var/run/dhcpd.pid`<br>        #Save that for later.<br>        #Send the omapi commands to kill dhcpd.<br>
<br>        #kill `cat $DAEMON_PIDFILE`<br>        $OMAPI_STOP_BIN $INTERFACEIP<br>        #Start looping and testing for the absence of the PID.<br>        #while ps -p $DHCPPROC >/dev/null; do<br>        #sleep .5<br>
        #done<br>        #fi<br>        #Always do this.<br>        #/usr/local/sbin/dhcpd -q<br>        #dhcpd should now be running<br>        # rm $DAEMON_PIDFILE<br>        ;;<br><br>------ truncated --------------<br>
<br>the "#" lines I got from a post here in the mail history but also made no change.<br><br>My main problem is that when I stop the dhcp server I always will get a "communication-interrupted". What I would like to have is a "partner-down".<br>
<br>So do any of you have a script or an idea how I can make the server to make a graceful shutdown of dhcp service?<br><br>thanx a lot,<br>cheers,<br>Juergen<br><br>