mirror of
https://github.com/Ysurac/openmptcprouter-feeds.git
synced 2025-03-09 15:40:03 +00:00
Merge branch 'pr/46' into test
This commit is contained in:
commit
6768d0fa3c
4 changed files with 14 additions and 1 deletions
|
@ -396,6 +396,9 @@ function wizard_add()
|
|||
vpn_port = 65301
|
||||
vpn_intf = "tun0"
|
||||
ucic:set("network","omrvpn","proto","dhcp")
|
||||
elseif default_vpn == "openvpn_bonding" then
|
||||
vpn_intf = "bonding-omrvpn"
|
||||
ucic:set("network","omrvpn","proto","bonding")
|
||||
end
|
||||
if vpn_intf ~= "" then
|
||||
ucic:set("network","omrvpn","ifname",vpn_intf)
|
||||
|
|
|
@ -491,7 +491,8 @@ return view.extend({
|
|||
so.datatype = 'or(ip4addr,"ignore")';
|
||||
so.rmempty = true;
|
||||
|
||||
so = ss.option(form.Value, 'leasetime', _('Lease time'));
|
||||
so = ss.option(form.Value, 'leasetime', _('Lease time'), _('The lease time is in seconds, or minutes (eg 45m) or hours (eg 1h) or "infinite"'));
|
||||
so.placeholder = '12h';
|
||||
so.rmempty = true;
|
||||
|
||||
so = ss.option(form.Value, 'duid', _('<abbr title="The DHCP Unique Identifier">DUID</abbr>'));
|
||||
|
|
|
@ -189,6 +189,9 @@ while true; do
|
|||
#if [ -z "$OMR_TRACKER_DEVICE_GATEWAY" ]; then
|
||||
# OMR_TRACKER_DEVICE_GATEWAY=$(ip -4 r list dev "$OMR_TRACKER_DEVICE" | grep -v default | awk '/proto static/ {print $1}' | tr -d "\n")
|
||||
#fi
|
||||
if [ "$OMR_TRACKER_DEVICE" = "bonding-omrvpn" ]; then
|
||||
OMR_TRACKER_DEVICE_GATEWAY="10.255.248.1"
|
||||
fi
|
||||
if [ -z "$OMR_TRACKER_DEVICE_GATEWAY" ]; then
|
||||
OMR_TRACKER_DEVICE_GATEWAY=$(uci -q get "network.$OMR_TRACKER_INTERFACE.gateway")
|
||||
fi
|
||||
|
|
|
@ -77,8 +77,14 @@ start_service()
|
|||
set network.omrvpn.updelay='20'
|
||||
set network.omrvpn.use_carrier='1'
|
||||
set network.omrvpn.mtu='1440'
|
||||
set network.omrvpn.ifname= 'bonding-omrvpn'
|
||||
set network.omrvpn.force_link='1'
|
||||
commit network
|
||||
EOF
|
||||
if [ "$(ip link show bonding-omrvpn)" = "" ]; then
|
||||
/etc/init.d/network restart
|
||||
sleep 10
|
||||
fi
|
||||
config_load openmptcprouter
|
||||
config_foreach _openvpnbonding interface
|
||||
ip link set bonding-omrvpn up
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue