dfa9c366bc
git-svn-id: svn://svn.openwrt.org/openwrt/packages@28351 3c298f89-4303-0410-b956-a3cf2f4a3e73
15 lines
374 B
Bash
15 lines
374 B
Bash
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."
|
|
else
|
|
/etc/init.d/ahcpd restart
|
|
fi
|
|
}
|