mwan3: add workaround for procd change
authorFlorian Eckert <redacted>
Fri, 17 Jul 2020 08:34:32 +0000 (10:34 +0200)
committerFlorian Eckert <redacted>
Mon, 20 Jul 2020 06:12:48 +0000 (08:12 +0200)
Signed-off-by: Florian Eckert <redacted>
net/mwan3/files/etc/init.d/mwan3

index af750e55e2259c4ed6d924b4e37eef9fddb5a6a8..e0c65889aacce789591c757b2a8d489385670c65 100755 (executable)
@@ -10,17 +10,22 @@ boot() {
        rc_procd start_service
 }
 
+# FIXME
+# fd 1000 is an inherited lock file descriptor for preventing concurrent
+# init script executions. Close it here to prevent the mwan3 daemon from
+# inheriting it further to avoid holding the lock indefinitely.
+
 reload_service() {
-       /usr/sbin/mwan3 restart
+       /usr/sbin/mwan3 restart 1000>&-
 }
 
 start_service() {
        [ -n "${mwan3_boot}" ] && return 0
-       /usr/sbin/mwan3 start
+       /usr/sbin/mwan3 start 1000>&-
 }
 
 stop_service() {
-       /usr/sbin/mwan3 stop
+       /usr/sbin/mwan3 stop 1000>&-
 }
 
 service_triggers() {
git clone https://git.99rst.org/PROJECT