Fix dhcp initscript logic to handle failures properly (#3941)
git-svn-id: svn://svn.openwrt.org/openwrt/packages@12425 3c298f89-4303-0410-b956-a3cf2f4a3e73
This commit is contained in:
parent
d591fb6cc6
commit
2b2ad573be
@ -15,7 +15,7 @@ start() {
|
|||||||
|
|
||||||
/usr/sbin/dhcpd -q -cf $config_file -lf $lease_file
|
/usr/sbin/dhcpd -q -cf $config_file -lf $lease_file
|
||||||
|
|
||||||
if [ $? -eq 0 ]; then
|
if [ $? -ne 0 ]; then
|
||||||
echo " isc-dhcpd failed to start"
|
echo " isc-dhcpd failed to start"
|
||||||
fi
|
fi
|
||||||
}
|
}
|
||||||
@ -25,7 +25,7 @@ stop() {
|
|||||||
if [ -e $pid_file ]; then
|
if [ -e $pid_file ]; then
|
||||||
kill `cat $pid_file`
|
kill `cat $pid_file`
|
||||||
|
|
||||||
if [ $? -eq 0 ]; then
|
if [ $? -ne 0 ]; then
|
||||||
echo " PID " `cat $pid_file` not found
|
echo " PID " `cat $pid_file` not found
|
||||||
echo " Is the DHCP server running?"
|
echo " Is the DHCP server running?"
|
||||||
fi
|
fi
|
||||||
|
Loading…
x
Reference in New Issue
Block a user