--- elwix/config/etc/uboot/rc.d/014.gif.stop 2014/09/15 19:06:52 1.2 +++ elwix/config/etc/uboot/rc.d/014.gif.stop 2017/02/13 16:52:47 1.3 @@ -2,12 +2,19 @@ IFACE="gif0" -TUNNEL="172.31.2.1 172.31.2.2" +TUNNEL="172.31.1.1 172.31.1.2" -OPT="mtu 1500" -IP="10.10.10.1/24 10.10.10.2" +OPTS="mtu 1500" +#IP="10.10.10.1/24 10.10.10.2" +IP="" -echo "Config GIF-IPoverIP network interface $IFACE ..." -ifconfig $IFACE create +[ -z "$IFACE" ] && exit + +echo "Config GIF network interface $IFACE ..." + +ifconfig $IFACE create || exit ifconfig $IFACE tunnel $TUNNEL -ifconfig $IFACE inet $IP $OPT up +if [ -n "$IP" ]; then + ifconfig $IFACE inet $IP +fi +ifconfig $IFACE $OPTS up