summaryrefslogtreecommitdiffstats
path: root/modules.d/35network-legacy/kill-dhclient.sh
blob: 9ed615fd9a20991762b3f782f93957ab3f0e02dd (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
#!/bin/sh

for f in /tmp/dhclient.*.pid; do
    [ -e "$f" ] || continue
    read -r PID < "$f"
    kill "$PID" > /dev/null 2>&1
done

sleep 0.1

for f in /tmp/dhclient.*.pid; do
    [ -e "$f" ] || continue
    read -r PID < "$f"
    kill -9 "$PID" > /dev/null 2>&1
done