1 | 1 | simandl | #!/bin/sh |
2 | | | # |
3 | | | # CZFree.Net RFC-QoS clear script |
4 | | | # version: 2.1.2 |
5 | | | # |
6 | | | |
7 | | | ### Configuration START |
8 | | | |
9 | 33 | simandl | IFACECONFFILE='/etc/qos/iface_conf' |
10 | 1 | simandl | |
11 | | | ### Configuration STOP |
12 | | | |
13 | | | if [ ! -f $IFACECONFFILE ] |
14 | | | then |
15 | | | echo "Interface configuration file doesn't exist - program terminated" 1>&2 |
16 | | | exit 1 |
17 | | | fi |
18 | | | |
19 | | | IFACECONF=`grep -v '^[[:space:]]*#' $IFACECONFFILE | tr -d '\n' | sed -e 's/[[:space:]]*}[[:space:]]*/}\\\n/g'` |
20 | | | FACES=`echo -e $IFACECONF | sed -e 's/^[[:space:]]*interface[[:space:]]\+\([[:alnum:]]\+\).*/\1/'` |
21 | | | |
22 | | | echo "Removing CZF-QoS rules..." |
23 | | | |
24 | | | TC="`which tc`" |
25 | | | |
26 | | | for FACE in ${FACES} ; do |
27 | | | $TC qdisc del dev ${FACE} root &>/dev/null |
28 | | | done |
29 | | | |
30 | | | iptables -t mangle -F |