diff options
author | Jo-Philipp Wich <jow@openwrt.org> | 2011-10-27 12:39:19 +0000 |
---|---|---|
committer | Jo-Philipp Wich <jow@openwrt.org> | 2011-10-27 12:39:19 +0000 |
commit | 356538e943156a232f9c6a1fb3e6160d4c87bb4e (patch) | |
tree | 470e5d32783e4cf971510995c27ae31a1490a581 /package/qos-scripts/files/usr | |
parent | 3226c8fe51a7e68ba7b6624fb3cf378d99f52e7a (diff) | |
download | master-187ad058-356538e943156a232f9c6a1fb3e6160d4c87bb4e.tar.gz master-187ad058-356538e943156a232f9c6a1fb3e6160d4c87bb4e.tar.bz2 master-187ad058-356538e943156a232f9c6a1fb3e6160d4c87bb4e.zip |
Add QoS firewall stop script generation
To prevent code duplication for clearing QoS firewall rules, support
"firewall stop" arguments to generate.sh to generate the necessary
script commands. Make use of this from qos-stop.
Signed-off-by: Kevin Locke <klocke@digitalenginesoftware.com>
git-svn-id: svn://svn.openwrt.org/openwrt/trunk@28623 3c298f89-4303-0410-b956-a3cf2f4a3e73
Diffstat (limited to 'package/qos-scripts/files/usr')
-rwxr-xr-x | package/qos-scripts/files/usr/bin/qos-stop | 3 | ||||
-rwxr-xr-x | package/qos-scripts/files/usr/lib/qos/generate.sh | 9 |
2 files changed, 9 insertions, 3 deletions
diff --git a/package/qos-scripts/files/usr/bin/qos-stop b/package/qos-scripts/files/usr/bin/qos-stop index d0243bea13..7f654d8587 100755 --- a/package/qos-scripts/files/usr/bin/qos-stop +++ b/package/qos-scripts/files/usr/bin/qos-stop @@ -3,5 +3,4 @@ for iface in $(tc qdisc show | grep -E '(hfsc|ingress)' | awk '{print $5}'); do tc qdisc del dev "$iface" ingress 2>&- >&- tc qdisc del dev "$iface" root 2>&- >&- done -iptables -t mangle -F -iptables -t mangle -X +/usr/lib/qos/generate.sh firewall stop | sh diff --git a/package/qos-scripts/files/usr/lib/qos/generate.sh b/package/qos-scripts/files/usr/lib/qos/generate.sh index 093967f7a1..a983d159ae 100755 --- a/package/qos-scripts/files/usr/lib/qos/generate.sh +++ b/package/qos-scripts/files/usr/lib/qos/generate.sh @@ -486,6 +486,13 @@ case "$1" in start_interfaces ;; firewall) - start_firewall + case "$2" in + stop) + stop_firewall + ;; + start|"") + start_firewall + ;; + esac ;; esac |