Hi

The only mean to disable multiwan is to delete the symlink in /etc/rc.d, but if 
you make a backup and restore it you have to re-delete the symlink.

This small patch add an "enabled" option to multiwan script.

It will allow me to have one image per router model, not one with multiwan and 
one without.

Best regards

Signed-off-by: Etienne CHAMPETIER <[email protected]>


Index: net/multiwan/files/usr/bin/multiwan
===================================================================
--- net/multiwan/files/usr/bin/multiwan (révision 29569)
+++ net/multiwan/files/usr/bin/multiwan (copie de travail)
@@ -1011,6 +1011,8 @@
 
 config_clear
 config_load "multiwan"
+config_get_bool        enabled config  enabled '1'
+[ "$enabled" -gt 0 ] || exit
 config_get default_route       config default_route
 config_get health_monitor      config health_monitor
 config_get iptables_interval   config iptables_interval '30'
Index: net/multiwan/files/etc/config/multiwan
===================================================================
--- net/multiwan/files/etc/config/multiwan      (révision 29569)
+++ net/multiwan/files/etc/config/multiwan      (copie de travail)
@@ -1,5 +1,8 @@
 
 config 'multiwan' 'config'
+       # REMOVE THIS LINE OR PUT TO 1 TO ENABLE MULTIWAN
+       option 'enabled' '0'
+
        option 'default_route' 'balancer'
        # health_monitor below is defaulted to parallel, and can be set to
        # serial to save system resources.
_______________________________________________
openwrt-devel mailing list
[email protected]
https://lists.openwrt.org/mailman/listinfo/openwrt-devel

Reply via email to