diff options
author | Waldemar Brodkorb <wbx@openadk.org> | 2009-12-18 19:26:51 +0100 |
---|---|---|
committer | Waldemar Brodkorb <wbx@openadk.org> | 2009-12-18 19:26:51 +0100 |
commit | 163e7965f05a281d653a9eaa72161172e35fd5fc (patch) | |
tree | 68433443b71118a83da66716b67400fcb2f6bb0a /package/ppp/files/poff | |
parent | 07b805f8a729e5fe064fc874cf1821a24378bb93 (diff) |
make pppoe over atm usable on ag241
- bridging nas0 and eth0 although works fine
need to add pre-up scripts to automate..
Diffstat (limited to 'package/ppp/files/poff')
-rwxr-xr-x | package/ppp/files/poff | 26 |
1 files changed, 12 insertions, 14 deletions
diff --git a/package/ppp/files/poff b/package/ppp/files/poff index 955cebe8c..d81dcac2e 100755 --- a/package/ppp/files/poff +++ b/package/ppp/files/poff @@ -1,14 +1,12 @@ -#!/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 +#!/bin/sh +PID=`ps w | grep "[ /]pppd call $1\( .*\)*\$" | awk '{print $1}'` +if test -n "$PID" ; then + kill $PID || { + echo "$0: kill failed." + exit 1 + } +else + echo "$0: I could not find a pppd process for provider '$1'." + exit 1 +fi +exit 0 |