You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 

16 lines
287 B

#!/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