--- elwix/config/etc/uboot/rc.d/011.sta.stop 2015/03/05 22:32:00 1.2.2.1 +++ elwix/config/etc/uboot/rc.d/011.sta.stop 2015/03/05 23:02:12 1.2.2.2 @@ -12,7 +12,10 @@ BINT="100" WIFIOPTS="" OPTS="" +#IP="auto" IP="172.31.1.2/30" +#IP6="auto" +IP6="" [ -z "$IFACE" -o -z "$WIFIDEV" ] && exit @@ -38,7 +41,18 @@ if [ -n "$SSID" ]; then ifconfig $IFACE ssid $SSID fi if [ -n "$IP" ]; then - ifconfig $IFACE inet $IP + if [ "$IP" = "auto" ]; then + dhclient $IFACE + else + ifconfig $IFACE inet $IP + fi +fi +if [ -n "$IP6" ]; then + if [ "$IP" = "auto" ]; then + ifconfig $IFACE accept_rtadv + else + ifconfig $IFACE inet6 $IP6 + fi fi ifconfig $IFACE $OPTS up