From a43effa1fcf9db99fa72f4038d88e6dc8fb8e903 Mon Sep 17 00:00:00 2001 From: "Nuno Silva (njsg)" Date: Sat, 20 Sep 2014 09:53:59 +0300 Subject: [PATCH] Use dhcpcd -k to force the release, instead of SIGHUP Newer dhcpcd versions use a different signal internally (SIGALRM), but dhcpcd -k interface_name will work with both newer and older versions of dhcpcd. --- net/dhcpcd.sh | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/net/dhcpcd.sh b/net/dhcpcd.sh index 2c0f919..bdb60c6 100644 --- a/net/dhcpcd.sh +++ b/net/dhcpcd.sh @@ -81,8 +81,11 @@ dhcpcd_stop() eval opts=\$dhcp_${IFVAR} [ -z "${opts}" ] && opts=${dhcp} case " ${opts} " in - *" release "*) sig=SIGHUP;; + *" release "*) dhcpcd -k "${IFACE}" ;; + *) + start-stop-daemon --stop --quiet \ + --signal ${sig} --pidfile "${pidfile}" + ;; esac - start-stop-daemon --stop --quiet --signal ${sig} --pidfile "${pidfile}" eend $? } -- 1.8.5.5