]> git.pld-linux.org Git - projects/rc-scripts.git/blob - sysconfig/network-scripts/ifdown-post
11b0c8ec1f5c050823f4696a4f167adc4aa60525
[projects/rc-scripts.git] / sysconfig / network-scripts / ifdown-post
1 #!/bin/sh
2 #
3 #       $Id: ifdown-post,v 1.10 2000/03/27 16:07:52 misiek Exp $
4 #
5 # This should be called whenever an interface goes down, not just when
6 # it is brought down explicitly.
7
8 run_down() { :; }
9
10 CONFIG=$1
11 . /etc/sysconfig/network
12 . /etc/rc.d/init.d/functions
13 . /etc/sysconfig/network-scripts/.functions
14
15 source_config
16
17 # full device name as specified by user
18 FULLDEVNAME="$DEVICE"
19 # type of device for example "dummy" or "eth"
20 DEVICETYPE=`echo $FULLDEVNAME | sed "s/[0-9]*$//"`
21 # name of real device ie. eth0 when eth0,eth0:1,eth0:alias
22 DEVICE=`echo $FULLDEVNAME | sed 's/:.*//g'`
23
24 if echo "$FULLDEVNAME" | grep -q ':' ; then
25         ISALIAS=yes
26 else
27         ISALIAS=no
28 fi
29
30 # execute run_up() function (if available in device configuration file)
31 [ "$ISALIAS" = "no" ] && run_down
32
33 # Notify programs that have requested notification
34 do_netreport
35
36 exit 0
This page took 0.074638 seconds and 2 git commands to generate.