source: projects/initscripts/tags/initscripts-8.91.0/sysconfig/network-scripts/ifdown-sit @ 2576

Revision 2576, 1.4 KB checked in by daisuke, 13 years ago (diff)

tagging as initscripts-8.91.0

Line 
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
23cd /etc/sysconfig/network-scripts
24. /etc/sysconfig/network-scripts/network-functions
25
26CONFIG=$1
27[ -f "$CONFIG" ] || CONFIG=ifcfg-$CONFIG
28source_config
29
30# IPv6 don't need aliases anymore, config is skipped
31REALDEVICE=`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
39if [ "$DEVICE" = "sit0" ]; then
40        echo $"Device '$DEVICE' isn't supported here, use IPV6_AUTOTUNNEL setting and restart (IPv6) networking"
41        exit 1
42fi
43
44# IPv6 test, no module loaded, exit if system is not IPv6-ready
45ipv6_test testonly || exit 0
46
47# Test device status
48ipv6_test_device_status $DEVICE
49if [ $? != 0 -a $? != 11 ]; then
50        # device doesn't exist or other problem occurs
51        exit 0
52fi
53
54# Cleanup and shut down IPv6-in-IPv4 tunnel device
55ipv6_del_tunnel_device $DEVICE
Note: See TracBrowser for help on using the repository browser.