diff options
author | Bill Nottingham <notting@redhat.com> | 2001-01-29 21:28:15 +0000 |
---|---|---|
committer | Bill Nottingham <notting@redhat.com> | 2001-01-29 21:28:15 +0000 |
commit | 9a44d5192982d82acb2ed25cd5ea34df74181d1f (patch) | |
tree | ce1e534d68200dc0928048a01242d9088ae83797 /sysconfig/network-scripts/ifup-ipv6 | |
parent | 3835851978d0a389aa085bc3ce8c7bb9bf8fa355 (diff) | |
download | initscripts-9a44d5192982d82acb2ed25cd5ea34df74181d1f.tar initscripts-9a44d5192982d82acb2ed25cd5ea34df74181d1f.tar.gz initscripts-9a44d5192982d82acb2ed25cd5ea34df74181d1f.tar.bz2 initscripts-9a44d5192982d82acb2ed25cd5ea34df74181d1f.tar.xz initscripts-9a44d5192982d82acb2ed25cd5ea34df74181d1f.zip |
add ipv6 support (#23576)
Diffstat (limited to 'sysconfig/network-scripts/ifup-ipv6')
-rwxr-xr-x | sysconfig/network-scripts/ifup-ipv6 | 56 |
1 files changed, 56 insertions, 0 deletions
diff --git a/sysconfig/network-scripts/ifup-ipv6 b/sysconfig/network-scripts/ifup-ipv6 new file mode 100755 index 00000000..23d02eb8 --- /dev/null +++ b/sysconfig/network-scripts/ifup-ipv6 @@ -0,0 +1,56 @@ +#!/bin/sh +# +# ifup-ipv6 +# +# Taken from: +# +# (P) & (C) 2000 Peter Bieringer <pb@bieringer.de> + +. /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 IPv6 address on specified interface + if ! [ -z "$IPV6ADDR" -o -z "$IPV6PREFIXLENGTH" ]; then + ifup_ipv6_real $DEVICE $IPV6ADDR $IPV6PREFIXLENGTH + fi + + # Setup additional (1) IPv6 address on specified interface + if ! [ -z "$IPV6ADDR_0" -o -z "$IPV6PREFIXLENGTH_0" ]; then + ifup_ipv6_real $DEVICE $IPV6ADDR_0 $IPV6PREFIXLENGTH_0 + fi + + # Setup additional (2) IPv6 address on specified interface + if ! [ -z "$IPV6ADDR_1" -o -z "$IPV6PREFIXLENGTH_1" ]; then + ifup_ipv6_real $DEVICE $IPV6ADDR_1 $IPV6PREFIXLENGTH_1 + fi + + # Setup additional static IPv6 routes on specified interface + [ -f /etc/sysconfig/static-routes-ipv6 ]; then + grep "^$DEVICE" /etc/sysconfig/static-routes-ipv6 | while read device args; do + if [ "$device" = "$DEVICE" ]; then + ifup_ipv6_route $args $DEVICE + fi + done + fi + + # Setup tunnel + if ! [ -z "$IPV6TUNNELIPV4" -o -z "$IPV6TUNNELROUTE" ]; then + ifup_ipv6_tunnel $DEVICE $IPV6TUNNELIPV4 $IPV6TUNNELROUTE + fi +fi |