[packages] ahcpd: avoid half-configured ahcpd interfaces
git-svn-id: svn://svn.openwrt.org/openwrt/packages@28351 3c298f89-4303-0410-b956-a3cf2f4a3e73
This commit is contained in:
parent
0dd9fce0b4
commit
dfa9c366bc
@ -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/
|
||||
|
@ -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
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user