]> git.pld-linux.org Git - projects/rc-scripts.git/blob - sysconfig/network-scripts/ifdown-atm
- merge my private tree
[projects/rc-scripts.git] / sysconfig / network-scripts / ifdown-atm
1 #!/bin/sh
2 #
3 #    ifup-atm - ATM CLIP interfaces configuration script
4 #    Copyright (C) 1999, 2000 Robert ¦laski <robin@atm.com.pl>
5 #    Copyright (C) 2000 Arkadiusz Mi¶kiewicz <misiek@pld.org.pl>
6 #    Copyright (C) 2000 Jan Rêkorajski <baggins@pld.org.pl>
7 #
8 #    This program is free software; you can redistribute it and/or modify
9 #    it under the terms of the GNU General Public License as published by
10 #    the Free Software Foundation; either version 2 of the License, or
11 #    (at your option) any later version.
12 #
13 #    This program is distributed in the hope that it will be useful,
14 #    but WITHOUT ANY WARRANTY; without even the implied warranty of
15 #    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
16 #    GNU General Public License for more details.
17 #
18 #    You should have received a copy of the GNU General Public License
19 #    along with this program; if not, write to the Free Software
20 #    Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
21 #
22 #    $Id: ifdown-atm,v 1.1.2.2 2001/09/30 10:19:42 misiek Exp $
23 #
24
25 . /etc/sysconfig/network
26 . /etc/rc.d/init.d/functions
27 . /etc/sysconfig/network-scripts/functions.network
28
29 DEV=$1
30
31 [ -z "$DEV" ] && {
32     nls "usage: %s <device name>" "ifup-atm" >&2
33     exit 1
34 }
35
36 if [ -r /etc/sysconfig/atm ]; then
37         . /etc/sysconfig/atm
38 else
39         exit 0
40 fi
41
42 if is_no "$CLIP"; then
43         exit 0
44 fi
45
46 if [ ! -x /sbin/atmarp ]; then
47         nls "%s is missing. Can't continue." "/sbin/atmarp"
48         exit 1
49 fi
50                 
51
52 if [ -f "/etc/sysconfig/interfaces/ifcfg-$DEV" ] ; then
53         CONFIG="/etc/sysconfig/interfaces/ifcfg-$DEV"
54 else
55         CONFIG="$DEV"
56 fi
57                 
58 source_config
59
60 if [ "foo$2" = "fooboot" ] && is_no "${ONBOOT}"; then
61         exit
62 fi
63
64 if [ -n "$ARPSRV_ATMADDR" ] ; then
65         if is_no "$ATMARP_SERVER" ; then
66                 atmarp -d $NETWORK arpsrv
67         fi
68 else
69         atmarp -d $ATMARP_REMIP
70 fi
71
72 # This must be last line !
73 # vi:syntax=sh:tw=78:ts=8:sw=4
74
This page took 0.02693 seconds and 3 git commands to generate.