Permalink
Switch branches/tags
Nothing to show
Find file Copy path
Fetching contributors…
Cannot retrieve contributors at this time
executable file 17 lines (14 sloc) 287 Bytes
#!/bin/sh
# Killall for dhcp clients.
for client in dhclient udhcpc pump; do
pid=$(pidof $client) || true
[ "$pid" ] || continue
if kill -0 $pid 2>/dev/null; then
kill -TERM $pid
sleep 1
# Still alive? Die!
if kill -0 $pid 2>/dev/null; then
kill -KILL $pid
fi
fi
done