#!/bin/sh IFACE="gif0" TUNNEL="172.31.1.1 172.31.1.2" OPTS="mtu 1500" #IP="10.10.10.1/24 10.10.10.2" IP="" [ -z "$IFACE" ] && exit echo "Config GIF network interface $IFACE ..." ifconfig $IFACE create || exit ifconfig $IFACE tunnel $TUNNEL if [ -n "$IP" ]; then ifconfig $IFACE inet $IP fi ifconfig $IFACE $OPTS up