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.
12 lines
237 B
12 lines
237 B
#!/bin/sh
|
|
# Killall for dhcp clients.
|
|
|
|
pids=$(ps ax | grep 'udhcpc\|dhclient\|pump' | sed 's/^[ ]*\([0-9]*\).*/\1/')
|
|
|
|
for pid in $pids; do
|
|
if kill -0 $pid 2>/dev/null; then
|
|
kill -TERM $pid
|
|
sleep 1
|
|
kill -KILL $pid
|
|
fi
|
|
done
|
|
|