1 |
commit: 42aa70384a89346dd1733dfff4131f56178dc26a |
2 |
Author: Nuno Silva (njsg) <njsg <AT> iki <DOT> fi> |
3 |
AuthorDate: Sat Sep 20 06:53:59 2014 +0000 |
4 |
Commit: Robin H. Johnson <robbat2 <AT> gentoo <DOT> org> |
5 |
CommitDate: Wed Sep 24 06:19:32 2014 +0000 |
6 |
URL: http://sources.gentoo.org/gitweb/?p=proj/netifrc.git;a=commit;h=42aa7038 |
7 |
|
8 |
Use dhcpcd -k to force the release, instead of SIGHUP |
9 |
|
10 |
Newer dhcpcd versions use a different signal internally (SIGALRM), but |
11 |
dhcpcd -k interface_name will work with both newer and older versions |
12 |
of dhcpcd. |
13 |
|
14 |
Signed-off-by: Robin H. Johnson <robbat2 <AT> gentoo.org> |
15 |
|
16 |
--- |
17 |
net/dhcpcd.sh | 7 +++++-- |
18 |
1 file changed, 5 insertions(+), 2 deletions(-) |
19 |
|
20 |
diff --git a/net/dhcpcd.sh b/net/dhcpcd.sh |
21 |
index 2c0f919..bdb60c6 100644 |
22 |
--- a/net/dhcpcd.sh |
23 |
+++ b/net/dhcpcd.sh |
24 |
@@ -81,8 +81,11 @@ dhcpcd_stop() |
25 |
eval opts=\$dhcp_${IFVAR} |
26 |
[ -z "${opts}" ] && opts=${dhcp} |
27 |
case " ${opts} " in |
28 |
- *" release "*) sig=SIGHUP;; |
29 |
+ *" release "*) dhcpcd -k "${IFACE}" ;; |
30 |
+ *) |
31 |
+ start-stop-daemon --stop --quiet \ |
32 |
+ --signal ${sig} --pidfile "${pidfile}" |
33 |
+ ;; |
34 |
esac |
35 |
- start-stop-daemon --stop --quiet --signal ${sig} --pidfile "${pidfile}" |
36 |
eend $? |
37 |
} |