]> TLD Linux GIT Repositories - rc-scripts.git/blob - lib/ifdown-post
- disable lock checks (happens on LUKS2 and fails during system boot)
[rc-scripts.git] / lib / ifdown-post
1 #!/bin/sh
2 #
3 #
4 # This should be called whenever an interface goes down, not just when
5 # it is brought down explicitly.
6
7 run_down() { :; }
8
9 CONFIG=$1
10 . /etc/sysconfig/network
11 . /etc/rc.d/init.d/functions
12 . /lib/rc-scripts/functions.network
13
14 source_config
15
16 # set all major variables
17 setup_ip_param
18
19 # set REALDEVICE
20 get_ppp_device_and_pid
21
22 # (QoS) Delete root queueing discipline
23 if [ -n "${BANDWIDTH_OUT}" ]; then
24         if [ "${QDISC_CLASS}" = "htb" -o "${QDISC_CLASS}" = "cbq" ]; then
25                 tc qdisc del dev ${REALDEVICE} root
26         elif [ -z "${QDISC}" -o "${QDISC}" = "tbf" ]; then
27                 tc qdisc del dev ${REALDEVICE} root
28         elif [ -n "${QDISC}" ]; then
29                 tc qdisc del dev ${REALDEVICE} root
30         fi
31 else
32         if [ -n "${QDISC}" ]; then
33                 tc qdisc del dev ${REALDEVICE} root
34         fi
35 fi
36
37 if [ -n "${BANDWIDTH_IN}" ]; then
38         tc qdisc del dev ${REALDEVICE} ingress
39 fi
40
41 # execute run_down() function (if available in device configuration file)
42 run_down
43
44 # Notify programs that have requested notification
45 do_netreport
46
47 exit 0