diff --git a/usr/bin/NETMODE b/usr/bin/NETMODE index 3b96bec..d365d7a 100755 --- a/usr/bin/NETMODE +++ b/usr/bin/NETMODE @@ -1,7 +1,7 @@ #!/bin/bash function show_usage() { - echo "Usage: $0 [DHCP_CLIENT|DHCP_SERVER]" + echo "Usage: $0 [DHCP_CLIENT|DHCP_SERVER|AUTO]" echo "" } @@ -11,16 +11,19 @@ function configure_client() { } function configure_server() { - uci set network.lan.proto='none' + uci set network.lan.proto='static' + uci set network.lan.ipaddr='172.16.24.1' + uci set network.lan.netmask='255.255.255.0' + uci set network.lan.ip6assign='60' /etc/init.d/odhcpd start } function blink() { count 3 while [ "${count}" -gt 0 ]; do - LED $1 + LED "${1}" sleep 0.25 - LED $2 + LED "${2}" sleep 0.25 count=$((count-1)) done