From a3c78648cbe6bccef70338cec95f36404d2787ef Mon Sep 17 00:00:00 2001 From: Florian Eckert Date: Thu, 17 Aug 2017 11:57:17 +0200 Subject: [PATCH] net/mwan3: remove lock file on mwan3 stop Signed-off-by: Florian Eckert (cherry picked from commit 5e123852bc2fc6970e9502ca01a697b2fb394e23) --- net/mwan3/files/lib/mwan3/mwan3.sh | 4 ++++ net/mwan3/files/usr/sbin/mwan3 | 2 ++ 2 files changed, 6 insertions(+) diff --git a/net/mwan3/files/lib/mwan3/mwan3.sh b/net/mwan3/files/lib/mwan3/mwan3.sh index eae69b7293..2bba6f9a32 100644 --- a/net/mwan3/files/lib/mwan3/mwan3.sh +++ b/net/mwan3/files/lib/mwan3/mwan3.sh @@ -15,6 +15,10 @@ mwan3_unlock() { lock -u /var/run/mwan3.lock } +mwan3_lock_clean() { + rm -rf /var/run/mwan3.lock +} + mwan3_get_iface_id() { local _tmp _iface _iface_count diff --git a/net/mwan3/files/usr/sbin/mwan3 b/net/mwan3/files/usr/sbin/mwan3 index b13067a04d..b3285b6f66 100755 --- a/net/mwan3/files/usr/sbin/mwan3 +++ b/net/mwan3/files/usr/sbin/mwan3 @@ -164,6 +164,8 @@ stop() for ipset in $($IPS -n list | grep mwan3 | grep -E '_v4|_v6'); do $IPS -q destroy $ipset done + + mwan3_lock_clean } restart() { -- 2.30.2