aboutsummaryrefslogtreecommitdiffstats
path: root/sysconfig/network-scripts/ifup-sit
diff options
context:
space:
mode:
authorBill Nottingham <notting@redhat.com>2001-02-07 21:47:16 +0000
committerBill Nottingham <notting@redhat.com>2001-02-07 21:47:16 +0000
commit3dbc16abe698daa238f76b3a1add4c41ec225067 (patch)
tree9e4943fc5b1db987a6c3667a5254f037ffa7fed9 /sysconfig/network-scripts/ifup-sit
parent4db6d852afc433a7559e2de32f586458f70f79bf (diff)
downloadinitscripts-3dbc16abe698daa238f76b3a1add4c41ec225067.tar
initscripts-3dbc16abe698daa238f76b3a1add4c41ec225067.tar.gz
initscripts-3dbc16abe698daa238f76b3a1add4c41ec225067.tar.bz2
initscripts-3dbc16abe698daa238f76b3a1add4c41ec225067.tar.xz
initscripts-3dbc16abe698daa238f76b3a1add4c41ec225067.zip
updated ipv6 stuff from Peter Bieringer
Diffstat (limited to 'sysconfig/network-scripts/ifup-sit')
-rwxr-xr-xsysconfig/network-scripts/ifup-sit41
1 files changed, 26 insertions, 15 deletions
diff --git a/sysconfig/network-scripts/ifup-sit b/sysconfig/network-scripts/ifup-sit
index ef703943..8a1daa56 100755
--- a/sysconfig/network-scripts/ifup-sit
+++ b/sysconfig/network-scripts/ifup-sit
@@ -2,9 +2,14 @@
#
# ifup-sit
#
+#
# Taken from:
-# (P) & (C) 2000 Peter Bieringer <pb@bieringer.de>
-# some hints taken from RedHat scripts
+# (P) & (C) 2000-2001 by Peter Bieringer <pb@bieringer.de>
+#
+# Version 2001-02-06
+#
+
+# Filter tags (for stripping, empty lines following if all is stripped)
. /etc/sysconfig/network
@@ -23,19 +28,25 @@ fi
# Test if IPv6 is up
if [ "${NETWORKING_IPV6}" = "yes" ]; then
- . /etc/sysconfig/network-scripts/network-functions-ipv6
+
+ . /etc/sysconfig/network-scripts/network-functions-ipv6
- # Setup tunnel
- if ! [ -z "$IPV6TUNNELIPV4" -o -z "$IPV6TUNNELROUTE" ]; then
- ifup_ipv6_tunnel $DEVICE $IPV6TUNNELIPV4 $IPV6TUNNELROUTE
- fi
+ # 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 $IPV6PREFIXLENGTH
+ 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
+ # 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