diff options
Diffstat (limited to 'sysconfig/network-scripts/ifup-sit')
-rwxr-xr-x | sysconfig/network-scripts/ifup-sit | 41 |
1 files changed, 41 insertions, 0 deletions
diff --git a/sysconfig/network-scripts/ifup-sit b/sysconfig/network-scripts/ifup-sit new file mode 100755 index 00000000..a7c5a315 --- /dev/null +++ b/sysconfig/network-scripts/ifup-sit @@ -0,0 +1,41 @@ +#!/bin/sh +# +# ifup-sit +# +# Taken from: +# (P) & (C) 2000 Peter Bieringer <pb@bieringer.de> +# some hints taken from RedHat scripts + +. /etc/sysconfig/network + +cd /etc/sysconfig/network-scripts +. network-functions + +CONFIG=$1 +[ -f "$CONFIG" ] || CONFIG=ifcfg-$CONFIG +source_config + +# Test if IPv6 configuration is enabled +if [ ! "$IPV6INIT" = "yes" ]; then + # not enabled, stop here + exit 0 +fi + +# Test if IPv6 is up +if [ "${NETWORKING_IPV6}" = "yes" ]; then + . /etc/sysconfig/network-scripts/network-functions-ipv6 + + # Setup tunnel + if ! [ -z "$IPV6TUNNELIPV4" -o -z "$IPV6TUNNELROUTE" ]; then + ifup_ipv6_tunnel $DEVICE $IPV6TUNNELIPV4 $IPV6TUNNELROUTE + fi + + # Add additional static IPv6 routes on specified interface + if [ -f /etc/sysconfig/static-routes-ipv6 ]; then + grep "^$DEVICE" /etc/sysconfig/static-routes-ipv6 | while read device ipv6route args; do + if [ "$device" = "$DEVICE" ]; then + ifup_ipv6_tunnel $DEVICE $IPV6TUNNELIPV4 $ipv6route + fi + done + fi +fi |