source: projects/initscripts/tags/initscripts-8.91.3/ppp/ipv6-down @ 1108

Revision 1108, 1.6 KB checked in by daisuke, 14 years ago (diff)

import initscripts-8.90.6 from internal cvs repository

Line 
1#!/bin/sh
2#
3# ipv6-down
4#
5# Called by pppd after IPV6CP/down was finished
6#
7# This file should not be modified -- make local changes to
8# /etc/ppp/ipv6-down.local instead
9#
10#
11# Taken from:
12# (P) & (C) 2001-2006 by Peter Bieringer <pb@bieringer.de>
13#
14#  You will find more information on the initscripts-ipv6 homepage at
15#   http://www.deepspace6.net/projects/initscripts-ipv6.html
16#
17# RHL integration assistance by Pekka Savola <pekkas@netcore.fi>
18#
19# Calling parameters:
20#  $1: interface name
21#  $6: logical interface name (set by pppd option ipparam)
22#
23# Version 2006-08-02
24#
25# Uses following information from /etc/sysconfig/network-scripts/ifcfg-$1:
26#  IPV6INIT=yes|no: controls IPv6 configuration for this interface
27#
28
29
30PATH=/sbin:/usr/sbin:/bin:/usr/bin
31export PATH
32
33LOGDEVICE=$6
34REALDEVICE=$1
35
36[ -f /etc/sysconfig/network ] || exit 0
37. /etc/sysconfig/network
38
39cd /etc/sysconfig/network-scripts
40. ./network-functions
41
42CONFIG=$LOGDEVICE
43[ -f "$CONFIG" ] || CONFIG=ifcfg-$CONFIG
44source_config
45
46[ -f /etc/sysconfig/network-scripts/network-functions-ipv6 ] || exit 1
47. /etc/sysconfig/network-scripts/network-functions-ipv6
48
49[ -x /etc/ppp/ipv6-down.local ] && /etc/ppp/ipv6-down.local "$@"
50
51
52if [ "$IPV6_CONTROL_RADVD" = "yes" ]; then
53        # Control running radvd
54        ipv6_trigger_radvd down "$IPV6_RADVD_TRIGGER_ACTION" $IPV6_RADVD_PIDFILE
55fi
56
57# IPv6 test, no module loaded, exit if system is not IPv6-ready
58ipv6_test testonly || exit 0
59
60# Test device status
61ipv6_test_device_status $REALDEVICE
62if [ $? != 0 -a $? != 11 ]; then
63        # device doesn't exist or other problem occurs
64        exit 1
65fi
66
67# Delete all current configured IPv6 addresses on this interface
68ipv6_cleanup_device $REALDEVICE
69
70exit 0
Note: See TracBrowser for help on using the repository browser.