Fix udhcpc for releasing

This commit is contained in:
Roy Marples 2007-04-23 17:19:43 +00:00
parent 4532564829
commit c5ada996ee

View File

@ -75,7 +75,7 @@ udhcpc_start() {
} }
udhcpc_stop() { udhcpc_stop() {
local pidfile="/var/run/udhcpc-${IFACE}.pid" opts= sig="TERM" local pidfile="/var/run/udhcpc-${IFACE}.pid" opts=
[ ! -f "${pidfile}" ] && return 0 [ ! -f "${pidfile}" ] && return 0
# Get our options # Get our options
@ -85,15 +85,15 @@ udhcpc_stop() {
ebegin "Stopping udhcpc on ${IFACE}" ebegin "Stopping udhcpc on ${IFACE}"
case " ${opts} " in case " ${opts} " in
*" release "*) *" release "*)
sig="USR2" start-stop-daemon --stop --quiet --oknodo --signal USR2 \
--exec /sbin/udhcpc --pidfile "${pidfile}"
if [ -f /var/cache/udhcpc-"${IFACE}".lease ] ; then if [ -f /var/cache/udhcpc-"${IFACE}".lease ] ; then
rm -f /var/cache/udhcpc-"${IFACE}".lease rm -f /var/cache/udhcpc-"${IFACE}".lease
fi fi
;; ;;
esac esac
start-stop-daemon --stop --quiet --signal "${sig}" \ start-stop-daemon --stop --exec /sbin/udhcpc --pidfile "${pidfile}"
--exec /sbin/udhcpc --pidfile "${pidfile}"
eend $? eend $?
} }