mirror of
https://github.com/sheumann/hush.git
synced 2024-12-21 23:29:34 +00:00
use SIGTERM to kill off udhcpd, not SIGKILL
This commit is contained in:
parent
e71e760a99
commit
15b588559b
@ -555,8 +555,11 @@ static int dhcp_down(struct interface_defn_t *ifd, execfn *exec)
|
||||
{
|
||||
int result = 0;
|
||||
if (execable("/sbin/udhcpc")) {
|
||||
/* SIGUSR2 forces udhcpc to release the current lease and go inactive,
|
||||
* and SIGTERM causes udhcpc to exit. Signals are queued and processed
|
||||
* sequentially so we don't need to sleep */
|
||||
result = execute("kill -USR2 `cat /var/run/udhcpc.%iface%.pid` 2>/dev/null", ifd, exec);
|
||||
result += execute("kill -9 `cat /var/run/udhcpc.%iface%.pid` 2>/dev/null", ifd, exec);
|
||||
result += execute("kill -TERM `cat /var/run/udhcpc.%iface%.pid` 2>/dev/null", ifd, exec);
|
||||
} else if (execable("/sbin/pump")) {
|
||||
result = execute("pump -i %iface% -k", ifd, exec);
|
||||
} else if (execable("/sbin/dhclient")) {
|
||||
|
Loading…
Reference in New Issue
Block a user