[1108] | 1 | #!/bin/sh |
---|
| 2 | # |
---|
| 3 | # ifdown-sit |
---|
| 4 | # |
---|
| 5 | # |
---|
| 6 | # Taken from: |
---|
| 7 | # (P) & (C) 2000-2003 by Peter Bieringer <pb@bieringer.de> |
---|
| 8 | # |
---|
| 9 | # You will find more information on the initscripts-ipv6 homepage at |
---|
| 10 | # http://www.deepspace6.net/projects/initscripts-ipv6.html |
---|
| 11 | # |
---|
| 12 | # RHL integration assistance by Pekka Savola <pekkas@netcore.fi> |
---|
| 13 | # |
---|
| 14 | # Version 2002-11-01 |
---|
| 15 | # |
---|
| 16 | # Uses following information from /etc/sysconfig/network-scripts/ifcfg-$1: |
---|
| 17 | # DEVICE=<device> |
---|
| 18 | # |
---|
| 19 | |
---|
| 20 | |
---|
| 21 | . /etc/sysconfig/network |
---|
| 22 | |
---|
| 23 | cd /etc/sysconfig/network-scripts |
---|
[2573] | 24 | . /etc/sysconfig/network-scripts/network-functions |
---|
[1108] | 25 | |
---|
| 26 | CONFIG=$1 |
---|
| 27 | [ -f "$CONFIG" ] || CONFIG=ifcfg-$CONFIG |
---|
| 28 | source_config |
---|
| 29 | |
---|
| 30 | # IPv6 don't need aliases anymore, config is skipped |
---|
| 31 | REALDEVICE=`echo ${DEVICE} | sed 's/:.*//g'` |
---|
| 32 | [ "$DEVICE" != "$REALDEVICE" ] && exit 0 |
---|
| 33 | |
---|
| 34 | [ -f /etc/sysconfig/network-scripts/network-functions-ipv6 ] || exit 1 |
---|
| 35 | . /etc/sysconfig/network-scripts/network-functions-ipv6 |
---|
| 36 | |
---|
| 37 | |
---|
| 38 | # Generic tunnel device sit0 is not supported here |
---|
| 39 | if [ "$DEVICE" = "sit0" ]; then |
---|
| 40 | echo $"Device '$DEVICE' isn't supported here, use IPV6_AUTOTUNNEL setting and restart (IPv6) networking" |
---|
| 41 | exit 1 |
---|
| 42 | fi |
---|
| 43 | |
---|
| 44 | # IPv6 test, no module loaded, exit if system is not IPv6-ready |
---|
| 45 | ipv6_test testonly || exit 0 |
---|
| 46 | |
---|
| 47 | # Test device status |
---|
| 48 | ipv6_test_device_status $DEVICE |
---|
| 49 | if [ $? != 0 -a $? != 11 ]; then |
---|
| 50 | # device doesn't exist or other problem occurs |
---|
| 51 | exit 0 |
---|
| 52 | fi |
---|
| 53 | |
---|
| 54 | # Cleanup and shut down IPv6-in-IPv4 tunnel device |
---|
| 55 | ipv6_del_tunnel_device $DEVICE |
---|