dhcpcd may not always be in /sbin
This commit is contained in:
parent
0c52821cba
commit
58bea85f92
@ -25,7 +25,7 @@
|
|||||||
|
|
||||||
dhcpcd_depend() {
|
dhcpcd_depend() {
|
||||||
after interface
|
after interface
|
||||||
program start /sbin/dhcpcd
|
program start /sbin/dhcpcd /usr/local/sbin/dhcpcd
|
||||||
provide dhcp
|
provide dhcp
|
||||||
|
|
||||||
# We prefer dhcpcd over the others
|
# We prefer dhcpcd over the others
|
||||||
@ -60,7 +60,7 @@ dhcpcd_start() {
|
|||||||
# Bring up DHCP for this interface
|
# Bring up DHCP for this interface
|
||||||
ebegin "Running dhcpcd"
|
ebegin "Running dhcpcd"
|
||||||
|
|
||||||
eval /sbin/dhcpcd "${args}" "${IFACE}"
|
eval dhcpcd "${args}" "${IFACE}"
|
||||||
eend $? || return 1
|
eend $? || return 1
|
||||||
|
|
||||||
_show_address
|
_show_address
|
||||||
@ -68,23 +68,16 @@ dhcpcd_start() {
|
|||||||
}
|
}
|
||||||
|
|
||||||
dhcpcd_stop() {
|
dhcpcd_stop() {
|
||||||
local pidfile="/var/run/dhcpcd-${IFACE}.pid" opts=
|
local pidfile="/var/run/dhcpcd-${IFACE}.pid" opts= sig=SIGTERM
|
||||||
[ ! -f "${pidfile}" ] && return 0
|
[ ! -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}"
|
ebegin "Stopping dhcpcd on ${IFACE}"
|
||||||
|
eval opts=\$dhcp_${IFVAR}
|
||||||
|
[ -z "${opts}" ] && opts=${dhcp}
|
||||||
case " ${opts} " in
|
case " ${opts} " in
|
||||||
*" release "*) dhcpcd -k "${IFACE}" ;;
|
*" release "*) sig=SIGHUP;;
|
||||||
*)
|
|
||||||
start-stop-daemon --stop --quiet \
|
|
||||||
--exec /sbin/dhcpcd --pidfile "${pidfile}"
|
|
||||||
;;
|
|
||||||
esac
|
esac
|
||||||
|
start-stop-daemon --stop --quiet --signal "${sig}" --pidfile "${pidfile}"
|
||||||
eend $?
|
eend $?
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user