mirror of
https://github.com/novatiq/packages.git
synced 2026-04-30 15:38:40 +01:00
wshaper: minor fixes
Adjust package version and release to reflect upstream compatibility, replace deprecated uci_get_state with network_get_device. Signed-off-by: Jo-Philipp Wich <jow@openwrt.org>
This commit is contained in:
@@ -8,13 +8,18 @@
|
||||
# All config needs to be done in /etc/config/wshaper
|
||||
|
||||
. /lib/functions.sh
|
||||
. /lib/functions/network.sh
|
||||
|
||||
config_load wshaper
|
||||
for s in downlink uplink network nopriohostdst nopriohostsrc noprioportdst noprioportsrc; do
|
||||
config_get $s settings $s
|
||||
done
|
||||
|
||||
device=$(uci_get_state network "$network" ifname "$network")
|
||||
[ -z "$device" ] && logger -t wondershaper "Error: Could not find the device for network $network, aborting." && exit 1
|
||||
if ! network_get_device device "$network"; then
|
||||
logger -t wondershaper "Error: Could not find the device for network $network, aborting."
|
||||
exit 1
|
||||
fi
|
||||
|
||||
[ -z "$downlink" ] && logger -t wondershaper "Error: Downlink speed not set, aborting." && exit 1
|
||||
[ -z "$uplink" ] && logger -t wondershaper "Error: Uplink speed not set, aborting." && exit 1
|
||||
|
||||
|
||||
Reference in New Issue
Block a user