mirror of
https://github.com/Ysurac/openmptcprouter-feeds.git
synced 2025-03-09 15:40:03 +00:00
Merge branch 'test' into develop
This commit is contained in:
commit
e44ba719db
2 changed files with 19 additions and 1 deletions
|
@ -56,8 +56,13 @@ omr_intf_set() {
|
|||
elif [ "$type" != "macvlan" ] && [ -n "$device" ] && [ -f /sys/bus/usb-serial/devices/${devicename}/device/uevent ] && [ "$(cat /sys/class/net/${ifname}/device/uevent | grep PRODUCT)" != "" ]; then
|
||||
uci -q set network.$1.modalias="$(cat /sys/bus/usb-serial/devices/${devicename}/device/uevent | grep MODALIAS | cut -d '=' -f2 | tr -d '\n')"
|
||||
uci -q set network.$1.product="$(cat /sys/bus/usb-serial/devices/${devicename}/device/uevent | grep PRODUCT | cut -d '=' -f2 | tr -d '\n')"
|
||||
else
|
||||
uci -q delete network.$1.modalias
|
||||
uci -q delete network.$1.product
|
||||
fi
|
||||
}
|
||||
|
||||
omr_set_settings() {
|
||||
[ -z "$multipath" ] || [ "$multipath" = "off" ] && [ "$1" != "omrvpn" ] && [ "$1" != "glorytun" ] && return
|
||||
|
||||
uci -q set openmptcprouter.$1=interface
|
||||
|
@ -76,7 +81,7 @@ start_service() {
|
|||
config_load openmptcprouter
|
||||
config_foreach omr_intf_check interface
|
||||
config_load network
|
||||
config_foreach omr_intf_set interface
|
||||
config_foreach omr_set_settings interface
|
||||
uci -q commit network
|
||||
uci -q commit openmptcprouter
|
||||
|
||||
|
@ -112,7 +117,13 @@ start_service() {
|
|||
EOF
|
||||
/etc/init.d/rpcd restart 2>&1 >/dev/null
|
||||
fi
|
||||
}
|
||||
|
||||
stop_service() {
|
||||
config_load network
|
||||
config_foreach omr_intf_set interface
|
||||
uci -q commit network
|
||||
uci -q commit openmptcprouter
|
||||
}
|
||||
|
||||
reload_service() {
|
||||
|
|
|
@ -115,6 +115,13 @@ if [ "$(uci -q get openmptcprouter.settings.menu)" = "" ]; then
|
|||
EOF
|
||||
fi
|
||||
|
||||
if [ "$(uci -q get openmptcprouter.settings.disableintfrename)" = "" ]; then
|
||||
uci -q batch <<-EOF >/dev/null
|
||||
set openmptcprouter.settings.disableintfrename='1'
|
||||
commit openmptcprouter
|
||||
EOF
|
||||
fi
|
||||
|
||||
sed -i 's/net.ipv4.tcp_retries2=3$/net.ipv4.tcp_retries2=15/' /etc/sysctl.d/zzz_openmptcprouter.conf
|
||||
|
||||
exit 0
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue