diff options
author | radaiming <radaiming@gmail.com> | 2014-12-13 14:42:34 +0800 |
---|---|---|
committer | radaiming <radaiming@gmail.com> | 2014-12-13 14:42:34 +0800 |
commit | 67811a647d399db5d188a242827760615a0f86b5 (patch) | |
tree | d183346d5cde5dcb5ad4ee3b66235076260d3138 /scripts | |
parent | 6e8eaa7a78b31cdab2edf140a9c8afdb02ffaca5 (diff) | |
download | ppp-67811a647d399db5d188a242827760615a0f86b5.tar.gz |
scripts: Avoid killing wrong pppd
poff could kill other pppd processes when there are many pppd
running on different serial port.
Signed-off-by: Ming Dai <radaiming@gmail.com>
Diffstat (limited to 'scripts')
-rw-r--r-- | scripts/poff | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/scripts/poff b/scripts/poff index 3f55a7f..5b45d98 100644 --- a/scripts/poff +++ b/scripts/poff @@ -91,7 +91,7 @@ if test "$#" -eq 0 -o "$MODE" = "all" ; then fi # There is an argument, so kill the pppd started on that provider. -PID=`ps axw | grep "[ /]pppd call $1" | awk '{print $1}'` +PID=`ps axw | grep "[ /]pppd call $1" | grep -w "$1" | awk '{print $1}'` if test -n "$PID" ; then $KILL -$SIG $PID || { echo "$0: $KILL failed. None ${DONE}." |