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

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

tagging as initscripts-8.91.0

Line 
1#!/bin/bash
2# Copyright (C) 1996-2006 Red Hat, Inc. all rights reserved.
3#
4# This program is free software; you can redistribute it and/or modify
5# it under the terms of the GNU General Public License, version 2,
6# as published by the Free Software Foundation.
7#
8# This program is distributed in the hope that it will be useful,
9# but WITHOUT ANY WARRANTY; without even the implied warranty of
10# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
11# GNU General Public License for more details.
12#
13# You should have received a copy of the GNU General Public License
14# along with this program; if not, write to the Free Software
15# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA
16
17# Thanks to:
18#  - Razvan Corneliu C.R. Vilt <razvan.vilt@linux360.ro>
19#  - Aaron Hope <aaron.hope@unh.edu>
20#  - Sean Millichamp <sean@enertronllc.com>
21# for providing the scripts this one is based on
22
23. /etc/init.d/functions
24
25cd /etc/sysconfig/network-scripts
26. /etc/sysconfig/network-scripts/network-functions
27
28[ -f /etc/sysconfig/network ] && . /etc/sysconfig/network
29
30CONFIG=$1
31need_config "$CONFIG"
32source_config
33
34# Generic tunnel devices are not supported here
35if [ "$DEVICE" = gre0 -o "$DEVICE" = tunl0 ]; then
36    echo $"Device '$DEVICE' isn't supported as a valid GRE device name."
37    exit 1
38fi
39
40check_device_down "$DEVICE" && exit 0
41
42/sbin/ip link set dev "$DEVICE" down
43/sbin/ip tunnel del "$DEVICE"
44
45exec /etc/sysconfig/network-scripts/ifdown-post "$CONFIG"
Note: See TracBrowser for help on using the repository browser.