OSDN Git Service

luci-app-turboacc: fix hw_flow settings
authorTianling Shen <cnsztl@immortalwrt.org>
Tue, 24 May 2022 11:23:35 +0000 (19:23 +0800)
committerTianling Shen <cnsztl@immortalwrt.org>
Tue, 24 May 2022 11:23:35 +0000 (19:23 +0800)
Signed-off-by: Tianling Shen <cnsztl@immortalwrt.org>
applications/luci-app-turboacc/root/etc/config/turboacc
applications/luci-app-turboacc/root/etc/uci-defaults/turboacc

index e52a0a6..d6c461c 100644 (file)
@@ -1,7 +1,7 @@
 
 config turboacc 'config'
        option sw_flow '1'
-       option hw_flow '0'
+       option hw_flow '1'
        option fullcone_nat '1'
        option bbr_cca '0'
        option dns_caching '0'
index cd7ef80..0bd6ad6 100755 (executable)
@@ -7,11 +7,6 @@ uci -q batch <<-EOF >/dev/null
        commit ucitrack
 EOF
 
-local hw_flow=0
-[ -n "$(cat /etc/openwrt_release | grep 'mt762')" ] && hw_flow=1
-uci -q batch <<-EOF >/dev/null
-       set turboacc.config.hw_flow=${hw_flow}
-       commit turboacc
-EOF
+grep -q "mt762" "/etc/openwrt_release" || { uci -q set turboacc.config.hw_flow=0; uci -q commit turboacc; }
 
 exit 0