[PATCH 03/16] 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>

Gbp-Pq: Name 0003-scripts-Avoid-killing-wrong-pppd.patch
This commit is contained in:
radaiming 2014-12-13 14:42:34 +08:00 committed by openKylinBot
parent e951d6b948
commit fca13df5dd
1 changed files with 1 additions and 1 deletions

View File

@ -91,7 +91,7 @@ if test "$#" -eq 0 -o "$MODE" = "all" ; then
fi fi
# There is an argument, so kill the pppd started on that provider. # 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 if test -n "$PID" ; then
$KILL -$SIG $PID || { $KILL -$SIG $PID || {
echo "$0: $KILL failed. None ${DONE}." echo "$0: $KILL failed. None ${DONE}."