summaryrefslogtreecommitdiff
path: root/package/ppp/files/poff
diff options
context:
space:
mode:
Diffstat (limited to 'package/ppp/files/poff')
-rwxr-xr-xpackage/ppp/files/poff14
1 files changed, 14 insertions, 0 deletions
diff --git a/package/ppp/files/poff b/package/ppp/files/poff
new file mode 100755
index 000000000..955cebe8c
--- /dev/null
+++ b/package/ppp/files/poff
@@ -0,0 +1,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