#!/bin/sh # # ifup-sit # # # Taken from: # (P) & (C) 2000-2001 by Peter Bieringer # # Version 2001-02-08 # # Filter tags (for stripping, empty lines following if all is stripped) . /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 for this interface 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 IPv6-in-IPv4 tunnel(s) if [ "$DEVICE" = "sit0" ]; then ifup_ipv6_autotunnel elif [ ! -z "$IPV6TUNNELIPV4" ]; then if [ ! -z "$IPV6ADDR" ]; then # Numbered tunnel ifup_ipv6_real sit0 $IPV6ADDR fi # Add static IPv6 tunnel routes on specified virtual 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 fi