commit: 42aa70384a89346dd1733dfff4131f56178dc26a
Author: Nuno Silva (njsg) <njsg <AT> iki <DOT> fi>
AuthorDate: Sat Sep 20 06:53:59 2014 +0000
Commit: Robin H. Johnson <robbat2 <AT> gentoo <DOT> org>
CommitDate: Wed Sep 24 06:19:32 2014 +0000
URL:
http://sources.gentoo.org/gitweb/?p=proj/netifrc.git;a=commit;h=42aa7038
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.
Signed-off-by: Robin H. Johnson <robbat2 <AT> gentoo.org>
---
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 $?
}