]> git.pld-linux.org Git - projects/rc-scripts.git/blob - lib/ifdown-post
- devtmpfs is madatory for udev >= 176
[projects/rc-scripts.git] / lib / ifdown-post
1 #!/bin/sh
2 #
3 #       $Id$
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 . /lib/rc-scripts/functions.network
14
15 source_config
16
17 # set all major variables
18 setup_ip_param
19
20 # set REALDEVICE
21 get_ppp_device_and_pid
22
23 # (QoS) Delete root queueing discipline
24 if [ -n "${BANDWIDTH_OUT}" ]; then
25         if [ "${QDISC_CLASS}" = "htb" -o "${QDISC_CLASS}" = "cbq" ]; then
26                 tc qdisc del dev ${REALDEVICE} root
27         elif [ -z "${QDISC}" -o "${QDISC}" = "tbf" ]; then
28                 tc qdisc del dev ${REALDEVICE} root
29         elif [ -n "${QDISC}" ]; then
30                 tc qdisc del dev ${REALDEVICE} root
31         fi
32 else
33         if [ -n "${QDISC}" ]; then
34                 tc qdisc del dev ${REALDEVICE} root
35         fi
36 fi
37
38 if [ -n "${BANDWIDTH_IN}" ]; then
39         tc qdisc del dev ${REALDEVICE} ingress
40 fi
41
42 # execute run_down() function (if available in device configuration file)
43 run_down
44
45 # Notify programs that have requested notification
46 do_netreport
47
48 exit 0
This page took 0.028488 seconds and 3 git commands to generate.