This is a fix for ticket 3550 (I don't have the rights to reopen the
ticket there, hence my post on this list). I'm not a shell guru so do
not hesitate to change it if something looks wrong.

Signed-off-by: Gabriel Kerneis <[email protected]>

--- 

Index: ipv6/ahcpd/files/ahcpd.init
===================================================================
--- ipv6/ahcpd/files/ahcpd.init (révision 15226)
+++ ipv6/ahcpd/files/ahcpd.init (copie de travail)
@@ -7,8 +7,8 @@
 ahcpd_config() {
        local cfg="$1"
        config_get interfaces "$cfg" interfaces
-       config_get no_ipv4 "$cfg" no_ipv4
-       config_get no_dns "$cfg" no_dns
+       config_get_bool no_ipv4 "$cfg" no_ipv4 0
+       config_get_bool no_dns "$cfg" no_dns 0
 }
 
 start() {
@@ -16,6 +16,12 @@
        config_foreach ahcpd_config ahcpd
        mkdir -p /var/lib
        [ -r /usr/lib/ahcp/ahcp.dat ] && authority="-a /usr/lib/ahcp/ahcp.dat"
+       if [ "$no_ipv4" -eq 0 ]; then
+        unset no_ipv4
+    fi
+       if [ "$no_dns" -eq 0 ]; then
+        unset no_dns
+    fi
        if [ -e $pidfile ] ; then
                echo "$pidfile exists -- not starting ahcpd." >&2
        else
Index: ipv6/ahcpd/files/ahcpd.config
===================================================================
--- ipv6/ahcpd/files/ahcpd.config       (révision 15226)
+++ ipv6/ahcpd/files/ahcpd.config       (copie de travail)
@@ -1,5 +1,4 @@
 config ahcpd
        option interfaces "wl0"
-       # Comment out to actually disable, see ticket 3550
        option no_dns false
        option no_ipv4 true
_______________________________________________
openwrt-devel mailing list
[email protected]
https://lists.openwrt.org/mailman/listinfo/openwrt-devel

Reply via email to