/[baselayout]/trunk/net.Linux/udhcpc.sh
Gentoo

Diff of /trunk/net.Linux/udhcpc.sh

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

Revision 2647 Revision 2648
73 _show_address 73 _show_address
74 return 0 74 return 0
75} 75}
76 76
77udhcpc_stop() { 77udhcpc_stop() {
78 local pidfile="/var/run/udhcpc-${IFACE}.pid" opts= sig="TERM" 78 local pidfile="/var/run/udhcpc-${IFACE}.pid" opts=
79 [ ! -f "${pidfile}" ] && return 0 79 [ ! -f "${pidfile}" ] && return 0
80 80
81 # Get our options 81 # Get our options
82 eval opts=\$dhcp_${IFVAR} 82 eval opts=\$dhcp_${IFVAR}
83 [ -z "${opts}" ] && opts=${dhcp} 83 [ -z "${opts}" ] && opts=${dhcp}
84 84
85 ebegin "Stopping udhcpc on ${IFACE}" 85 ebegin "Stopping udhcpc on ${IFACE}"
86 case " ${opts} " in 86 case " ${opts} " in
87 *" release "*) 87 *" release "*)
88 sig="USR2" 88 start-stop-daemon --stop --quiet --oknodo --signal USR2 \
89 --exec /sbin/udhcpc --pidfile "${pidfile}"
89 if [ -f /var/cache/udhcpc-"${IFACE}".lease ] ; then 90 if [ -f /var/cache/udhcpc-"${IFACE}".lease ] ; then
90 rm -f /var/cache/udhcpc-"${IFACE}".lease 91 rm -f /var/cache/udhcpc-"${IFACE}".lease
91 fi 92 fi
92 ;; 93 ;;
93 esac 94 esac
94 95
95 start-stop-daemon --stop --quiet --signal "${sig}" \
96 --exec /sbin/udhcpc --pidfile "${pidfile}" 96 start-stop-daemon --stop --exec /sbin/udhcpc --pidfile "${pidfile}"
97 eend $? 97 eend $?
98} 98}
99 99
100# vim: set ts=4 : 100# vim: set ts=4 :

Legend:
Removed from v.2647  
changed lines
  Added in v.2648

  ViewVC Help
Powered by ViewVC 1.1.20