Changeset 3377

Show
Ignore:
Timestamp:
08/02/07 14:16:56 (1 year ago)
Author:
tg
Message:

poff: rewrite in mksh, use busybox ps always (both small and full have
ps w option); please test.

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • trunk/freewrt/package/ppp/Makefile

    r3255 r3377  
    99PKG_NAME:=              ppp 
    1010PKG_VERSION:=           2.4.4 
    11 PKG_RELEASE:=           14 
     11PKG_RELEASE:=           15 
    1212PKG_MD5SUM:=            183800762e266132218b204dfb428d29 
    1313MASTER_SITES:=          ftp://ftp.samba.org/pub/ppp/ 
  • trunk/freewrt/package/ppp/files/poff

    r3213 r3377  
    1 #!/bin/sh 
    2 PID=`ps wx | grep "[ /]pppd call $1\( .*\)*\$" | awk '{print $1}'` 
    3 if test -n "$PID" ; then 
    4     kill $PID || { 
    5         echo "$0: kill failed." 
    6         exit 1 
    7     } 
    8 else 
    9     echo "$0: I could not find a pppd process for provider '$1'." 
    10     exit 1 
    11 fi 
    12 exit 0 
     1#!/bin/mksh 
     2(busybox ps ww | grep "[ /]pppd call $1\( .*\)*\$") |& 
     3found=0 
     4rv=0 
     5while read thepid rest; do 
     6        if ! kill $thepid; then 
     7                print -u2 "$0: kill $thepid failed" 
     8                rv=1 
     9        fi 
     10        found=1 
     11done 
     12[[ $found = 1 ]] && exit $rv 
     13print -u2 "$0: I could not find a pppd process for provider '$1'." 
     14exit 1