2010-02-22 11:00:30 +00:00
|
|
|
setup_interface_ahcp() {
|
|
|
|
local interface="$1"
|
|
|
|
local config="$2"
|
|
|
|
|
2011-10-01 11:30:03 +00:00
|
|
|
setup_interface_none "$interface" "$config"
|
|
|
|
|
2011-09-30 17:31:33 +00:00
|
|
|
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."
|
2011-10-01 11:30:03 +00:00
|
|
|
else
|
|
|
|
/etc/init.d/ahcpd restart
|
2011-09-30 17:31:33 +00:00
|
|
|
fi
|
2010-02-22 11:00:30 +00:00
|
|
|
}
|