contrib/meshwizard: add support for setting up qos on wan
This commit is contained in:
parent
7c0b1137ef
commit
86503afdd9
3 changed files with 23 additions and 2 deletions
|
@ -30,6 +30,6 @@ for v in system wifi_device wifi_iface interface alias dhcp olsr_interface olsr_
|
|||
done
|
||||
|
||||
# read values from meshwizard
|
||||
for v in system luci_main contact community wan lan general ipv6; do
|
||||
for v in system luci_main contact community wan lan general ipv6 qos; do
|
||||
get_var meshwizard.$v
|
||||
done
|
||||
|
|
17
contrib/package/meshwizard/files/usr/bin/meshwizard/helpers/setup_qos.sh
Executable file
17
contrib/package/meshwizard/files/usr/bin/meshwizard/helpers/setup_qos.sh
Executable file
|
@ -0,0 +1,17 @@
|
|||
#!/bin/sh
|
||||
# sets up qos-scripts for the wan interface
|
||||
|
||||
. /lib/functions.sh
|
||||
. $dir/functions.sh
|
||||
|
||||
if [ ! -f /etc/config/qos ]; then
|
||||
echo "NOT setting up QOS because /etc/config/qos-scripts was not found"
|
||||
else
|
||||
uci batch <<- EOF
|
||||
set qos.wan.enabled=1
|
||||
set qos.wan.upload=$wan_up
|
||||
set qos.wan.download=$wan_down
|
||||
EOF
|
||||
uci_commitverbose "Setup QOS on WAN interface." qos
|
||||
|
||||
fi
|
|
@ -12,7 +12,7 @@
|
|||
. /lib/functions.sh
|
||||
|
||||
echo "
|
||||
/* Meshwizard 0.1.0 */
|
||||
/* Meshwizard 0.2.0 */
|
||||
"
|
||||
|
||||
# config
|
||||
|
@ -71,6 +71,10 @@ if [ "$wan_proto" == "dhcp" ]; then
|
|||
$dir/helpers/setup_wan_dhcp.sh
|
||||
fi
|
||||
|
||||
if [ -n "$wan_down" -a -n "$wan_up" ]; then
|
||||
$dir/helpers/setup_qos.sh
|
||||
fi
|
||||
|
||||
if [ "$lan_proto" == "static" ] && [ -n "$lan_ip4addr" ] && [ -n "$lan_netmask" ]; then
|
||||
$dir/helpers/setup_lan_static.sh
|
||||
fi
|
||||
|
|
Loading…
Reference in a new issue