]>
Commit | Line | Data |
---|---|---|
d29c401a | 1 | #!/bin/sh |
b0443108 | 2 | # |
97c76ad5 | 3 | # $Id: ifdown-post,v 1.9 2000/03/08 16:30:14 misiek Exp $ |
b0443108 | 4 | # |
7742e157 AF |
5 | # This should be called whenever an interface goes down, not just when |
6 | # it is brought down explicitly. | |
7 | ||
7742e157 | 8 | CONFIG=$1 |
f3002e12 JK |
9 | . /etc/sysconfig/network |
10 | . /etc/rc.d/init.d/functions | |
8b3e2b71 | 11 | . /etc/sysconfig/network-scripts/.functions |
12 | ||
7742e157 AF |
13 | source_config |
14 | ||
97c76ad5 AM |
15 | # full device name as specified by user |
16 | FULLDEVNAME="$DEVICE" | |
17 | # type of device for example "dummy" or "eth" | |
18 | DEVICETYPE=`echo $FULLDEVNAME | sed "s/[0-9]*$//"` | |
19 | # name of real device ie. eth0 when eth0,eth0:1,eth0:alias | |
20 | DEVICE=`echo $FULLDEVNAME | sed 's/:.*//g'` | |
21 | ||
22 | if echo "$FULLDEVNAME" | grep -q ':' ; then | |
23 | ISALIAS=yes | |
24 | else | |
25 | ISALIAS=no | |
26 | fi | |
27 | ||
28 | # run scripts in /etc/sysconfig/interfaces/scripts/$DEVICE/ | |
29 | # named somename.up | |
30 | rparts "/etc/sysconfig/interfaces/scripts/$DEVICE" stop | |
31 | ||
7742e157 AF |
32 | # Notify programs that have requested notification |
33 | do_netreport | |
34 | ||
35 | exit 0 |