mirror of https://gitee.com/openkylin/ppp.git
[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:
parent
e951d6b948
commit
fca13df5dd
|
@ -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}."
|
||||||
|
|
Loading…
Reference in New Issue