[packages] ahcpd: avoid half-configured ahcpd interfaces
authorGabriel Kerneis <kerneis@pps.jussieu.fr>
Sat, 1 Oct 2011 11:30:03 +0000 (11:30 +0000)
committerGabriel Kerneis <kerneis@pps.jussieu.fr>
Sat, 1 Oct 2011 11:30:03 +0000 (11:30 +0000)
SVN-Revision: 28351

ipv6/ahcpd/Makefile
ipv6/ahcpd/files/ahcp.sh

index dbaa664b2b88de5efce71ae5df41691afa07bbf9..19beb3074f5c9a2ebf7674beb2758570adaaa802 100644 (file)
@@ -9,7 +9,7 @@ include $(TOPDIR)/rules.mk
 
 PKG_NAME:=ahcpd
 PKG_VERSION:=0.52
-PKG_RELEASE:=2
+PKG_RELEASE:=3
 
 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
 PKG_SOURCE_URL:=http://www.pps.jussieu.fr/~jch/software/files/
index 6dc8c97585e38679ca0df545cf7150165181c3de..11788e29fad4990fbefcc81ba4ca4cc747756ed4 100644 (file)
@@ -2,12 +2,13 @@ setup_interface_ahcp() {
        local interface="$1"
        local config="$2"
 
+       setup_interface_none "$interface" "$config"
+
        local mode=$(uci_get_state ahcpd "@ahcpd[0]" mode "client")
        if [ "$mode" != "client" ]; then
                echo "Warning: ahcp ignored for $interface (mode is $mode, should be client)."
                echo "Fix ahcp mode in /etc/config/ahcpd."
-               return
+       else
+               /etc/init.d/ahcpd restart
        fi
-       setup_interface_none "$interface" "$config"
-       /etc/init.d/ahcpd restart
 }