summaryrefslogtreecommitdiffstats
path: root/patches/ppp-2.4.7/0002-scripts-Avoid-killing-wrong-pppd.patch
blob: dc24c228eafac86cb02da562358088612c96fd4a (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
From: radaiming <radaiming@gmail.com>
Date: Sat, 13 Dec 2014 14:42:34 +0800
Subject: [PATCH] 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>

Imported from ppp_2.4.7-2+4.1.debian.tar.xz

Signed-off-by: Michael Olbrich <m.olbrich@pengutronix.de>
---
 scripts/poff | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/scripts/poff b/scripts/poff
index 3f55a7f40010..5b45d98a2b6a 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}."