mirror of
https://github.com/novatiq/packages.git
synced 2026-04-30 15:38:40 +01:00
net/mwan3: fix mwan3track kill execution
If two interface have the same prefix "wan" for example "wan" and "wan1" pgrep returns the PID for wan1 also "pgrep -f mwan3track wan". Before this fix "wan1" was also killed! This is not what we want. Signed-off-by: Florian Eckert <fe@dev.tdt.de>
This commit is contained in:
@@ -36,7 +36,7 @@ ifdown()
|
||||
|
||||
ACTION=ifdown INTERFACE=$1 /sbin/hotplug-call iface
|
||||
|
||||
kill $(pgrep -f "mwan3track $1") &> /dev/null
|
||||
kill $(pgrep -f "mwan3track $1 $2") &> /dev/null
|
||||
}
|
||||
|
||||
ifup()
|
||||
|
||||
@@ -10,7 +10,7 @@ IFDOWN_EVENT=0
|
||||
|
||||
clean_up() {
|
||||
$LOG notice "Stopping mwan3track for interface \"${INTERFACE}\""
|
||||
if [ "$(pgrep -f "mwan3track ${INTERFACE}")" = "" ]; then
|
||||
if [ "$(pgrep -f "mwan3track ${INTERFACE} ${DEVICE}")" = "" ]; then
|
||||
rm -rf "/var/run/mwan3track/${INTERFACE}" &> /dev/null
|
||||
fi
|
||||
if [ -z "$(ls -A "/var/run/mwan3track")" ]; then
|
||||
|
||||
Reference in New Issue
Block a user