aboutsummaryrefslogtreecommitdiffstats
path: root/package/network/config/qos-scripts/files
diff options
context:
space:
mode:
authorMoritz Warning <moritzwarning@web.de>2018-07-10 18:50:30 +0200
committerHans Dedecker <dedeckeh@gmail.com>2018-07-11 09:40:40 +0200
commit954faac7bc1dd34047bc4132cd28a96089fcce4e (patch)
tree045f282cb9975f26541a172f33d96effec2657a7 /package/network/config/qos-scripts/files
parent4630159294024c0718077e49dbb440919440de87 (diff)
downloadupstream-954faac7bc1dd34047bc4132cd28a96089fcce4e.tar.gz
upstream-954faac7bc1dd34047bc4132cd28a96089fcce4e.tar.bz2
upstream-954faac7bc1dd34047bc4132cd28a96089fcce4e.zip
qos-scripts: fix indentation
Signed-off-by: Moritz Warning <moritzwarning@web.de>
Diffstat (limited to 'package/network/config/qos-scripts/files')
-rwxr-xr-xpackage/network/config/qos-scripts/files/usr/bin/qos-start2
-rwxr-xr-xpackage/network/config/qos-scripts/files/usr/bin/qos-stop1
-rwxr-xr-xpackage/network/config/qos-scripts/files/usr/lib/qos/generate.sh28
3 files changed, 16 insertions, 15 deletions
diff --git a/package/network/config/qos-scripts/files/usr/bin/qos-start b/package/network/config/qos-scripts/files/usr/bin/qos-start
index 261ffb42b0..68dae70638 100755
--- a/package/network/config/qos-scripts/files/usr/bin/qos-start
+++ b/package/network/config/qos-scripts/files/usr/bin/qos-start
@@ -1,4 +1,4 @@
#!/bin/sh
+
qos-stop
/usr/lib/qos/generate.sh all | sh
-
diff --git a/package/network/config/qos-scripts/files/usr/bin/qos-stop b/package/network/config/qos-scripts/files/usr/bin/qos-stop
index 7f654d8587..ea3bba3abf 100755
--- a/package/network/config/qos-scripts/files/usr/bin/qos-stop
+++ b/package/network/config/qos-scripts/files/usr/bin/qos-stop
@@ -1,4 +1,5 @@
#!/bin/sh
+
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>&- >&-
diff --git a/package/network/config/qos-scripts/files/usr/lib/qos/generate.sh b/package/network/config/qos-scripts/files/usr/lib/qos/generate.sh
index 48c9f4a9df..3ec7f80e53 100755
--- a/package/network/config/qos-scripts/files/usr/lib/qos/generate.sh
+++ b/package/network/config/qos-scripts/files/usr/lib/qos/generate.sh
@@ -118,21 +118,21 @@ parse_matching_rule() {
append "$var" "-m comment --comment '$value'"
;;
*:tos)
- add_insmod xt_dscp
- case "$value" in
- !*) append "$var" "-m tos ! --tos $value";;
- *) append "$var" "-m tos --tos $value"
- esac
- ;;
+ add_insmod xt_dscp
+ case "$value" in
+ !*) append "$var" "-m tos ! --tos $value";;
+ *) append "$var" "-m tos --tos $value"
+ esac
+ ;;
*:dscp)
- add_insmod xt_dscp
+ add_insmod xt_dscp
dscp_option="--dscp"
- [ -z "${value%%[EBCA]*}" ] && dscp_option="--dscp-class"
+ [ -z "${value%%[EBCA]*}" ] && dscp_option="--dscp-class"
case "$value" in
- !*) append "$var" "-m dscp ! $dscp_option $value";;
- *) append "$var" "-m dscp $dscp_option $value"
- esac
- ;;
+ !*) append "$var" "-m dscp ! $dscp_option $value";;
+ *) append "$var" "-m dscp $dscp_option $value"
+ esac
+ ;;
*:direction)
value="$(echo "$value" | sed -e 's,-,:,g')"
if [ "$value" = "out" ]; then
@@ -428,7 +428,7 @@ start_cg() {
cat <<EOF
$INSMOD
EOF
-
+
for command in $iptables; do
cat <<EOF
$command -w -t mangle -N qos_${cg}
@@ -486,7 +486,7 @@ stop_firewall() {
-e 's/^-A/-D/' \
-e '${p;g}' |
# Make into proper iptables calls
- # Note: awkward in previous call due to hold space usage
+ # Note: awkward in previous call due to hold space usage
sed -n -e "s/^./${command} -w -t mangle &/p"
done
}