1
0
Fork 0
mirror of https://github.com/Ysurac/openmptcprouter-feeds.git synced 2025-03-09 15:40:03 +00:00

Less output for uci defaults

This commit is contained in:
Ycarus 2019-04-18 09:11:57 +02:00
parent 8a014cf520
commit 7b8c43a449
6 changed files with 33 additions and 33 deletions

View file

@ -1,6 +1,6 @@
#!/bin/sh
if [ "$(uci -q show network.globals | grep mptcp_path_manager)" = "" ]; then
uci -q batch <<-EOF
uci -q batch <<-EOF >/dev/null
set network.globals.multipath='enable'
set network.globals.mptcp_path_manager='fullmesh'
set network.globals.mptcp_scheduler='default'
@ -12,55 +12,55 @@ if [ "$(uci -q show network.globals | grep mptcp_path_manager)" = "" ]; then
EOF
fi
if [ "$(uci -q get network.globals.congestion)" != "bbr" ]; then
uci -q batch <<-EOF
uci -q batch <<-EOF >/dev/null
set network.globals.congestion=bbr
commit network
EOF
fi
if [ "$(uci -q get network.globals.mptcp_syn_retries)" != "1" ]; then
uci -q batch <<-EOF
uci -q batch <<-EOF >/dev/null
set network.globals.mptcp_syn_retries=1
commit network
EOF
fi
if [ "$(uci -q get network.globals.mptcp_checksum)" != "0" ]; then
uci -q batch <<-EOF
uci -q batch <<-EOF >/dev/null
set network.globals.mptcp_checksum=0
commit network
EOF
fi
if [ "$(uci -q get network.globals.mptcp_checksum)" = "enable" ]; then
uci -q batch <<-EOF
uci -q batch <<-EOF >/dev/null
set network.globals.mptcp_checksum=1
EOF
fi
if [ "$(uci -q get network.globals.mptcp_checksum)" = "disable" ]; then
uci -q batch <<-EOF
uci -q batch <<-EOF >/dev/null
set network.globals.mptcp_checksum=0
EOF
fi
if [ "$(uci -q get network.globals.mptcp_debug)" != "0" ]; then
uci -q batch <<-EOF
uci -q batch <<-EOF >/dev/null
set network.globals.mptcp_debug=0
EOF
fi
if [ "$(uci -q show network.globals | grep mptcp_fullmesh)" = "" ]; then
uci -q batch <<-EOF
uci -q batch <<-EOF >/dev/null
set network.globals.mptcp_fullmesh_num_subflows=1
set network.globals.mptcp_fullmesh_create_on_err=1
set network.globals.mptcp_ndiffports_num_subflows=1
commit network
EOF
fi
uci -q batch <<-EOF
uci -q batch <<-EOF >/dev/null
delete ucitrack.@mptcp[-1]
add ucitrack mptcp
set ucitrack.@mptcp[-1].init=mptcp
commit ucitrack
EOF
if [ "$(uci -q get ucitrack.@network[-1].affects | grep mptcp)" = "" ]; then
uci -q batch <<-EOF
uci -q batch <<-EOF >/dev/null
add_list ucitrack.@network[-1].affects=mptcp
commit ucitrack
EOF