aboutsummaryrefslogtreecommitdiff
path: root/net
diff options
context:
space:
mode:
authorRoy Marples <roy@marples.name>2007-11-21 15:39:19 +0000
committerRoy Marples <roy@marples.name>2007-11-21 15:39:19 +0000
commit58bea85f922549b88efb8fc163ad8c82de4fdfd1 (patch)
treeb63e6c2a4496fff4cf8f1933375949a02b783db8 /net
parent0c52821cba79a0c649450c0a1519bbfb21a4f975 (diff)
dhcpcd may not always be in /sbin
Diffstat (limited to 'net')
-rw-r--r--net/dhcpcd.sh21
1 files changed, 7 insertions, 14 deletions
diff --git a/net/dhcpcd.sh b/net/dhcpcd.sh
index 322ebfff..8d6692e8 100644
--- a/net/dhcpcd.sh
+++ b/net/dhcpcd.sh
@@ -25,7 +25,7 @@
dhcpcd_depend() {
after interface
- program start /sbin/dhcpcd
+ program start /sbin/dhcpcd /usr/local/sbin/dhcpcd
provide dhcp
# We prefer dhcpcd over the others
@@ -60,7 +60,7 @@ dhcpcd_start() {
# Bring up DHCP for this interface
ebegin "Running dhcpcd"
- eval /sbin/dhcpcd "${args}" "${IFACE}"
+ eval dhcpcd "${args}" "${IFACE}"
eend $? || return 1
_show_address
@@ -68,23 +68,16 @@ dhcpcd_start() {
}
dhcpcd_stop() {
- local pidfile="/var/run/dhcpcd-${IFACE}.pid" opts=
+ local pidfile="/var/run/dhcpcd-${IFACE}.pid" opts= sig=SIGTERM
[ ! -f "${pidfile}" ] && return 0
- # Get our options
- if [ -x /sbin/dhcpcd ] ; then
- eval opts=\$dhcp_${IFVAR}
- [ -z "${opts}" ] && opts=${dhcp}
- fi
-
ebegin "Stopping dhcpcd on ${IFACE}"
+ eval opts=\$dhcp_${IFVAR}
+ [ -z "${opts}" ] && opts=${dhcp}
case " ${opts} " in
- *" release "*) dhcpcd -k "${IFACE}" ;;
- *)
- start-stop-daemon --stop --quiet \
- --exec /sbin/dhcpcd --pidfile "${pidfile}"
- ;;
+ *" release "*) sig=SIGHUP;;
esac
+ start-stop-daemon --stop --quiet --signal "${sig}" --pidfile "${pidfile}"
eend $?
}