summaryrefslogtreecommitdiff
path: root/package/ppp/files/poff
blob: 955cebe8c29e7ac50084279e60b3c807fe77df37 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
#!/bin/mksh
(busybox ps ww | grep "[ /]pppd call $1\( .*\)*\$") |&
found=0
rv=0
while read thepid rest; do
	if ! kill $thepid; then
		print -u2 "$0: kill $thepid failed"
		rv=1
	fi
	found=1
done
[[ $found = 1 ]] && exit $rv
print -u2 "$0: I could not find a pppd process for provider '$1'."
exit 1