qos-scripts: fix trailing whitespace in config files
Signed-off-by: Manas Sambhus <manas.sambhus+github@gmail.com>
This commit is contained in:
committed by
Christian Marangi
parent
0ca634e9ef
commit
3e2ea10e5e
@@ -1,4 +1,4 @@
|
|||||||
#!/bin/sh
|
#!/bin/sh
|
||||||
|
|
||||||
qos-stop
|
qos-stop
|
||||||
/usr/lib/qos/generate.sh all | sh
|
/usr/lib/qos/generate.sh all | sh
|
||||||
|
|||||||
@@ -32,7 +32,7 @@ print_comments() {
|
|||||||
echo '# Direction: '"$2"
|
echo '# Direction: '"$2"
|
||||||
echo '# Stats: '"$3"
|
echo '# Stats: '"$3"
|
||||||
echo ''
|
echo ''
|
||||||
}
|
}
|
||||||
|
|
||||||
get_device() {
|
get_device() {
|
||||||
( config_load network; scan_interfaces; config_get "$1" ifname )
|
( config_load network; scan_interfaces; config_get "$1" ifname )
|
||||||
|
|||||||
@@ -64,7 +64,7 @@ parse_matching_rule() {
|
|||||||
append "$var" "${proto:+-p $proto}"
|
append "$var" "${proto:+-p $proto}"
|
||||||
for option in $options; do
|
for option in $options; do
|
||||||
config_get value "$section" "$option"
|
config_get value "$section" "$option"
|
||||||
|
|
||||||
case "$pkt:$option" in
|
case "$pkt:$option" in
|
||||||
*:srchost)
|
*:srchost)
|
||||||
append "$var" "-s $value"
|
append "$var" "-s $value"
|
||||||
@@ -282,14 +282,14 @@ start_interface() {
|
|||||||
config_get device "$iface" device
|
config_get device "$iface" device
|
||||||
config_get_bool enabled "$iface" enabled 1
|
config_get_bool enabled "$iface" enabled 1
|
||||||
[ -z "$device" -o 1 -ne "$enabled" ] && {
|
[ -z "$device" -o 1 -ne "$enabled" ] && {
|
||||||
return 1
|
return 1
|
||||||
}
|
}
|
||||||
config_get upload "$iface" upload
|
config_get upload "$iface" upload
|
||||||
config_get_bool halfduplex "$iface" halfduplex
|
config_get_bool halfduplex "$iface" halfduplex
|
||||||
config_get download "$iface" download
|
config_get download "$iface" download
|
||||||
config_get classgroup "$iface" classgroup
|
config_get classgroup "$iface" classgroup
|
||||||
config_get_bool overhead "$iface" overhead 0
|
config_get_bool overhead "$iface" overhead 0
|
||||||
|
|
||||||
download="${download:-${halfduplex:+$upload}}"
|
download="${download:-${halfduplex:+$upload}}"
|
||||||
enum_classes "$classgroup"
|
enum_classes "$classgroup"
|
||||||
for dir in ${halfduplex:-up} ${download:+down}; do
|
for dir in ${halfduplex:-up} ${download:+down}; do
|
||||||
@@ -373,7 +373,7 @@ add_rules() {
|
|||||||
local var="$1"
|
local var="$1"
|
||||||
local rules="$2"
|
local rules="$2"
|
||||||
local prefix="$3"
|
local prefix="$3"
|
||||||
|
|
||||||
for rule in $rules; do
|
for rule in $rules; do
|
||||||
unset iptrule
|
unset iptrule
|
||||||
config_get target "$rule" target
|
config_get target "$rule" target
|
||||||
@@ -437,7 +437,7 @@ EOF
|
|||||||
|
|
||||||
for command in $iptables; do
|
for command in $iptables; do
|
||||||
cat <<EOF
|
cat <<EOF
|
||||||
$command -w -t mangle -N qos_${cg}
|
$command -w -t mangle -N qos_${cg}
|
||||||
$command -w -t mangle -N qos_${cg}_ct
|
$command -w -t mangle -N qos_${cg}_ct
|
||||||
EOF
|
EOF
|
||||||
done
|
done
|
||||||
|
|||||||
@@ -103,4 +103,3 @@ END {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user