[packages] ahcpd: avoid half-configured ahcpd interfaces
authorkerneis <kerneis@3c298f89-4303-0410-b956-a3cf2f4a3e73>
Sat, 1 Oct 2011 11:30:03 +0000 (11:30 +0000)
committerkerneis <kerneis@3c298f89-4303-0410-b956-a3cf2f4a3e73>
Sat, 1 Oct 2011 11:30:03 +0000 (11:30 +0000)
git-svn-id: svn://svn.openwrt.org/openwrt/packages@28351 3c298f89-4303-0410-b956-a3cf2f4a3e73

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

index dbaa664..19beb30 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 6dc8c97..11788e2 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
 }