--- elwix/config/etc/default/rc.d/014.gre.stop 2011/07/05 23:43:00 1.1 +++ elwix/config/etc/default/rc.d/014.gre.stop 2017/02/13 16:52:47 1.2 @@ -4,10 +4,16 @@ IFACE="gre0" TUNNEL="172.31.2.1 172.31.2.2" -OPT="" +OPTS="" IP="10.10.10.1/24 10.10.10.2" +[ -z "$IFACE" ] && exit + echo "Config GRE network interface $IFACE ..." -ifconfig $IFACE create + +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