From d42ef7fd4b3b211afc718b808ce7e8aa18fb45fe Mon Sep 17 00:00:00 2001 From: "Ycarus (Yannick Chabanois)" Date: Mon, 15 Feb 2021 19:52:06 +0100 Subject: [PATCH 1/5] Add IPv6 in omr-tracker config --- .../luasrc/model/cbi/omr-tracker.lua | 5 +++++ omr-tracker/files/etc/config/omr-tracker | 6 ++++++ omr-tracker/files/etc/uci-defaults/omr-tracker | 12 ++++++++++++ 3 files changed, 23 insertions(+) diff --git a/luci-app-omr-tracker/luasrc/model/cbi/omr-tracker.lua b/luci-app-omr-tracker/luasrc/model/cbi/omr-tracker.lua index f00afe5fd..3484b1afa 100644 --- a/luci-app-omr-tracker/luasrc/model/cbi/omr-tracker.lua +++ b/luci-app-omr-tracker/luasrc/model/cbi/omr-tracker.lua @@ -132,6 +132,11 @@ o.placeholder = "4.2.2.1" o.default = { "4.2.2.1", "8.8.8.8" } o.rmempty = false +o = s:option(DynamicList, "hosts6", translate("Hosts IPv6"),translate("Must be IPs and not domains")) +o.placeholder = "2001:4860:4860::8844" +o.default = { "2001:4860:4860::8888", "2001:4860:4860::8844" } +o.rmempty = false + s = m:section(TypedSection, "interface", translate("Interfaces")) s.template_addremove = "omr-tracker/cbi-select-add" s.addremove = true diff --git a/omr-tracker/files/etc/config/omr-tracker b/omr-tracker/files/etc/config/omr-tracker index bf64d41d1..6f9d1c258 100644 --- a/omr-tracker/files/etc/config/omr-tracker +++ b/omr-tracker/files/etc/config/omr-tracker @@ -11,6 +11,12 @@ config defaults 'defaults' list hosts '80.67.169.40' list hosts '114.114.114.114' list hosts '1.1.1.1' + list hosts6 '2606:4700:4700::1111' + list hosts6 '2606:4700:4700::1001' + list hosts6 '2620:fe::fe' + list hosts6 '2620:fe::9' + list hosts6 '2001:4860:4860::8888' + list hosts6 '2001:4860:4860::8844' option timeout '2' option tries '3' option interval '2' diff --git a/omr-tracker/files/etc/uci-defaults/omr-tracker b/omr-tracker/files/etc/uci-defaults/omr-tracker index 30aec42b9..cf2ca0dab 100755 --- a/omr-tracker/files/etc/uci-defaults/omr-tracker +++ b/omr-tracker/files/etc/uci-defaults/omr-tracker @@ -60,6 +60,18 @@ if [ "$(uci -q get omr-tracker.proxy.hosts | grep '103.224.182.242')" != "" ]; t EOF fi +if [ -z "$(uci -q get omr-tracker.defaults.hosts6)" ]; then + uci -q batch <<-EOF >/dev/null + add_list omr-tracker.defaults.hosts6='2606:4700:4700::1111' + add_list omr-tracker.defaults.hosts6='2606:4700:4700::1001' + add_list omr-tracker.defaults.hosts6='2620:fe::fe' + add_list omr-tracker.defaults.hosts6='2620:fe::9' + add_list omr-tracker.defaults.hosts6='2001:4860:4860::8888' + add_list omr-tracker.defaults.hosts6='2001:4860:4860::8844' + commit omr-tracker + EOF +fi + if [ "$(uci -q get omr-tracker.defaults.wait_test)" = "" ]; then uci -q batch <<-EOF >/dev/null set omr-tracker.defaults.wait_test=1 From 35f7ce04decf4e906a7a1df0fbfd496324c70d29 Mon Sep 17 00:00:00 2001 From: "Ycarus (Yannick Chabanois)" Date: Mon, 15 Feb 2021 19:53:28 +0100 Subject: [PATCH 2/5] Disable IPv6 checkbox in wizard --- .../luasrc/view/openmptcprouter/wizard.htm | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/luci-app-openmptcprouter/luasrc/view/openmptcprouter/wizard.htm b/luci-app-openmptcprouter/luasrc/view/openmptcprouter/wizard.htm index 363b30852..a0b5851e1 100644 --- a/luci-app-openmptcprouter/luasrc/view/openmptcprouter/wizard.htm +++ b/luci-app-openmptcprouter/luasrc/view/openmptcprouter/wizard.htm @@ -673,13 +673,14 @@ <% end %> +
From 56e032152dd09369768b3c44fac50c4e8d8aa4f7 Mon Sep 17 00:00:00 2001 From: "Ycarus (Yannick Chabanois)" Date: Mon, 15 Feb 2021 19:55:07 +0100 Subject: [PATCH 3/5] Support alias interfaces --- luci-app-omr-bypass/root/etc/init.d/omr-bypass | 1 + mlvpn/files/etc/init.d/mlvpn | 2 ++ mptcp/files/etc/init.d/mptcp | 3 +++ .../files/usr/share/omr/post-tracking.d/post-tracking | 10 ++++++++++ omr-quota/files/etc/init.d/omr-quota | 1 + omr-tracker/files/etc/init.d/omr-tracker | 1 + openmptcprouter/files/etc/firewall.gre-tunnel | 1 + 7 files changed, 19 insertions(+) diff --git a/luci-app-omr-bypass/root/etc/init.d/omr-bypass b/luci-app-omr-bypass/root/etc/init.d/omr-bypass index a859b345e..d1e2d9592 100755 --- a/luci-app-omr-bypass/root/etc/init.d/omr-bypass +++ b/luci-app-omr-bypass/root/etc/init.d/omr-bypass @@ -465,6 +465,7 @@ _intf_rule() { local intf config_get intf $1 ifname [ -z "$intf" ] && intf=$(ifstatus "$1" | jsonfilter -q -e '@["l3_device"]') + [ -n "$(echo $intf | grep '@')" ] && intf=$(ifstatus "$1" | jsonfilter -q -e '@["device"]') #count=$((count+1)) config_get count $1 metric local mode diff --git a/mlvpn/files/etc/init.d/mlvpn b/mlvpn/files/etc/init.d/mlvpn index 761694f6c..3021f143e 100755 --- a/mlvpn/files/etc/init.d/mlvpn +++ b/mlvpn/files/etc/init.d/mlvpn @@ -15,8 +15,10 @@ interface_multipath_settings() { [ "$mode" = "off" ] || [ "$mode" = "" ] && return 1 config_get ifname "$config" ifname [ -z "$ifname" ] && ifname=$(ifstatus "$config" | jsonfilter -q -e '@["l3_device"]') + [ -n "$(echo $ifname | grep '@')" ] && ifname=$(ifstatus "$1" | jsonfilter -q -e '@["device"]') [ -z "$ifname" ] && return 1 addr=$(ifstatus ${config} | jsonfilter -q -e '@["ipv4-address"][0].address') + [ -z "$addr" ] && return 1 count=$(($count+1)) port=$((firstport+count)) cat >> /tmp/etc/${interface_name}.conf <<-EOF diff --git a/mptcp/files/etc/init.d/mptcp b/mptcp/files/etc/init.d/mptcp index 77310f5eb..a405f4bd0 100755 --- a/mptcp/files/etc/init.d/mptcp +++ b/mptcp/files/etc/init.d/mptcp @@ -84,6 +84,7 @@ interface_multipath_settings() { config_get iface "$config" ifname config_get txqueuelen "$config" txqueuelen [ -z "$iface" ] && iface=$(ifstatus "$config" | jsonfilter -q -e '@["l3_device"]') + [ -n "$(echo $iface | grep '@')" ] && iface=$(ifstatus "$config" | jsonfilter -q -e '@["device"]') if [ "$(uci -q get openmptcprouter.${config}.metric)" = "" ]; then count=$((count+1)) metric=$count @@ -382,6 +383,7 @@ add_route() { [ -n "$table" ] && routeset="table $table" config_get interface "$1" interface iface=$(ifstatus "$interface" | jsonfilter -q -e '@["l3_device"]') + [ -n "$(echo $iface | grep '@')" ] && iface=$(ifstatus "$interface" | jsonfilter -q -e '@["device"]') routeset="$routeset dev $iface" logger -t "MPTCP" "Add route $routeset" ip route replace $routeset @@ -402,6 +404,7 @@ add_route6() { [ -n "$table" ] && routeset="table $table" config_get interface "$1" interface iface=$(ifstatus "$interface" | jsonfilter -q -e '@["l3_device"]') + [ -n "$(echo $iface | grep '@')" ] && iface=$(ifstatus "$interface" | jsonfilter -q -e '@["device"]') routeset="$routeset dev $iface" logger -t "MPTCP" "Add IPv6 route $routeset" ip -6 route replace $routeset diff --git a/mptcp/files/usr/share/omr/post-tracking.d/post-tracking b/mptcp/files/usr/share/omr/post-tracking.d/post-tracking index b00a88e6c..aaa044cae 100755 --- a/mptcp/files/usr/share/omr/post-tracking.d/post-tracking +++ b/mptcp/files/usr/share/omr/post-tracking.d/post-tracking @@ -13,6 +13,7 @@ set_route() { interface_up=$(ifstatus "$INTERFACE" 2>/dev/null | jsonfilter -q -e '@["up"]') [ -z "$interface_if" ] && interface_if=$(ifstatus "${INTERFACE}_4" 2>/dev/null | jsonfilter -q -e '@["l3_device"]') [ -z "$interface_if" ] && interface_if=$(uci -q get network.$INTERFACE.ifname) + [ -n "$(echo $interface_if | grep '@')" ] && interface_if=$(ifstatus "${INTERFACE}" | jsonfilter -q -e '@["device"]') interface_current_config=$(uci -q get openmptcprouter.$INTERFACE.state || echo "up") if [ "$multipath_config_route" != "off" ] && [ "$SETROUTE" != true ] && [ "$INTERFACE" != "$PREVINTERFACE" ] && [ "$interface_current_config" = "up" ] && [ "$interface_up" = "true" ]; then interface_gw="$(uci -q get network.$INTERFACE.gateway)" @@ -46,6 +47,7 @@ set_route6() { interface_up=$(ifstatus "$INTERFACE" 2>/dev/null | jsonfilter -q -e '@["up"]') [ -z "$interface_if" ] && interface_if=$(ifstatus "${INTERFACE}_4" 2>/dev/null | jsonfilter -q -e '@["l3_device"]') [ -z "$interface_if" ] && interface_if=$(uci -q get network.$INTERFACE.ifname) + [ -n "$(echo $interface_if | grep '@')" ] && interface_if=$(ifstatus "$INTERFACE" | jsonfilter -q -e '@["device"]') interface_current_config=$(uci -q get openmptcprouter.$INTERFACE.state || echo "up") if [ "$multipath_config_route" != "off" ] && [ "$SETROUTE" != true ] && [ "$INTERFACE" != "$PREVINTERFACE" ] && [ "$interface_current_config" = "up" ] && [ "$interface_up" = "true" ]; then interface_gw="$(uci -q get network.$INTERFACE.gateway)" @@ -149,6 +151,7 @@ set_routes_intf() { interface_if=$(ifstatus "$INTERFACE" 2>/dev/null | jsonfilter -q -e '@["l3_device"]') [ -z "$interface_if" ] && interface_if=$(ifstatus "${INTERFACE}_4" 2>/dev/null | jsonfilter -q -e '@["l3_device"]') [ -z "$interface_if" ] && interface_if=$(uci -q get network.$INTERFACE.ifname) + [ -n "$(echo $interface_if | grep '@')" ] && ifname=$(ifstatus "$INTERFACE" | jsonfilter -q -e '@["device"]') interface_up=$(ifstatus "$INTERFACE" 2>/dev/null | jsonfilter -q -e '@["up"]') #multipath_current_config=$(multipath $interface_if | grep 'deactivated') interface_current_config=$(uci -q get openmptcprouter.$INTERFACE.state || echo "up") @@ -198,6 +201,7 @@ set_routes_intf6() { interface_if=$(ifstatus "$INTERFACE" 2>/dev/null | jsonfilter -q -e '@["l3_device"]') [ -z "$interface_if" ] && interface_if=$(ifstatus "${INTERFACE}_6" 2>/dev/null | jsonfilter -q -e '@["l3_device"]') [ -z "$interface_if" ] && interface_if=$(uci -q get network.$INTERFACE.ifname) + [ -n "$(echo $interface_if | grep '@')" ] && interface_if=$(ifstatus "$INTERFACE" | jsonfilter -q -e '@["device"]') interface_up=$(ifstatus "$INTERFACE" 2>/dev/null | jsonfilter -q -e '@["up"]') #multipath_current_config=$(multipath $interface_if | grep 'deactivated') interface_current_config=$(uci -q get openmptcprouter.$INTERFACE.state || echo "up") @@ -247,6 +251,7 @@ set_route_balancing() { interface_if=$(ifstatus "$INTERFACE" 2>/dev/null | jsonfilter -q -e '@["l3_device"]') [ -z "$interface_if" ] && interface_if=$(ifstatus "${INTERFACE}_4" 2>/dev/null | jsonfilter -q -e '@["l3_device"]') [ -z "$interface_if" ] && interface_if=$(uci -q get network.$INTERFACE.ifname) + [ -n "$(echo $interface_if | grep '@')" ] && interface_if=$(ifstatus "$INTERFACE" | jsonfilter -q -e '@["device"]') interface_up=$(ifstatus "$INTERFACE" 2>/dev/null | jsonfilter -q -e '@["up"]') interface_current_config=$(uci -q get openmptcprouter.$INTERFACE.state || echo "up") if [ "$multipath_config_route" != "off" ] && [ "$interface_current_config" = "up" ] && [ "$interface_up" = "true" ]; then @@ -290,6 +295,7 @@ set_route_balancing6() { interface_if=$(ifstatus "$INTERFACE" 2>/dev/null | jsonfilter -q -e '@["l3_device"]') [ -z "$interface_if" ] && interface_if=$(ifstatus "${INTERFACE}_4" 2>/dev/null | jsonfilter -q -e '@["l3_device"]') [ -z "$interface_if" ] && interface_if=$(uci -q get network.$INTERFACE.ifname) + [ -n "$(echo $interface_if | grep '@')" ] && interface_if=$(ifstatus "$INTERFACE" | jsonfilter -q -e '@["device"]') interface_up=$(ifstatus "$INTERFACE" 2>/dev/null | jsonfilter -q -e '@["up"]') interface_current_config=$(uci -q get openmptcprouter.$INTERFACE.state || echo "up") if [ "$multipath_config_route" != "off" ] && [ "$interface_current_config" = "up" ] && [ "$interface_up" = "true" ]; then @@ -335,6 +341,7 @@ set_server_all_routes() { interface_if=$(uci -q get network.$OMR_TRACKER_INTERFACE.ifname) [ -z "$interface_if" ] && interface_if=$(ifstatus "$OMR_TRACKER_INTERFACE" 2>/dev/null | jsonfilter -q -e '@["l3_device"]') [ -z "$interface_if" ] && interface_if=$(ifstatus "${OMR_TRACKER_INTERFACE}_4" 2>/dev/null | jsonfilter -q -e '@["l3_device"]') + [ -z "$interface_if" ] && interface_if=$(ifstatus "$OMR_TRACKER_INTERFACE" | jsonfilter -q -e '@["device"]') interface_up=$(ifstatus "$OMR_TRACKER_INTERFACE" 2>/dev/null | jsonfilter -q -e '@["up"]') multipath_config_route=$(uci -q get openmptcprouter.$OMR_TRACKER_INTERFACE.multipath || echo "off") [ "$multipath_config_route" ] && multipath_config_route=$(uci -q get network.$OMR_TRACKER_INTERFACE.multipath || echo 'off') @@ -376,6 +383,7 @@ set_server_all_routes6() { interface_if=$(uci -q get network.$OMR_TRACKER_INTERFACE.ifname) [ -z "$interface_if" ] && interface_if=$(ifstatus "$OMR_TRACKER_INTERFACE" 2>/dev/null | jsonfilter -q -e '@["l3_device"]') [ -z "$interface_if" ] && interface_if=$(ifstatus "${OMR_TRACKER_INTERFACE}_6" 2>/dev/null | jsonfilter -q -e '@["l3_device"]') + [ -z "$interface_if" ] && interface_if=$(ifstatus "$OMR_TRACKER_INTERFACE" | jsonfilter -q -e '@["device"]') interface_up=$(ifstatus "$OMR_TRACKER_INTERFACE" 2>/dev/null | jsonfilter -q -e '@["up"]') multipath_config_route=$(uci -q get openmptcprouter.$OMR_TRACKER_INTERFACE.multipath || echo "off") [ "$multipath_config_route" ] && multipath_config_route=$(uci -q get network.$OMR_TRACKER_INTERFACE.multipath || echo 'off') @@ -424,6 +432,7 @@ set_server_route() { interface_if=$(uci -q get network.$OMR_TRACKER_INTERFACE.ifname) [ -z "$interface_if" ] && interface_if=$(ifstatus "$OMR_TRACKER_INTERFACE" 2>/dev/null | jsonfilter -q -e '@["l3_device"]') [ -z "$interface_if" ] && interface_if=$(ifstatus "${OMR_TRACKER_INTERFACE}_4" 2>/dev/null | jsonfilter -q -e '@["l3_device"]') + [ -z "$interface_if" ] && interface_if=$(ifstatus "$OMR_TRACKER_INTERFACE" | jsonfilter -q -e '@["device"]') interface_up=$(ifstatus "$OMR_TRACKER_INTERFACE" 2>/dev/null | jsonfilter -q -e '@["up"]') #multipath_current_config=$(multipath $interface_if | grep "deactivated") interface_current_config=$(uci -q get openmptcprouter.$OMR_TRACKER_INTERFACE.state || echo "up") @@ -455,6 +464,7 @@ set_server_route6() { interface_if=$(uci -q get network.$OMR_TRACKER_INTERFACE.ifname) [ -z "$interface_if" ] && interface_if=$(ifstatus "$OMR_TRACKER_INTERFACE" 2>/dev/null | jsonfilter -q -e '@["l3_device"]') [ -z "$interface_if" ] && interface_if=$(ifstatus "${OMR_TRACKER_INTERFACE}_6" 2>/dev/null | jsonfilter -q -e '@["l3_device"]') + [ -z "$interface_if" ] && interface_if=$(ifstatus "$OMR_TRACKER_INTERFACE" | jsonfilter -q -e '@["device"]') interface_up=$(ifstatus "$OMR_TRACKER_INTERFACE" 2>/dev/null | jsonfilter -q -e '@["up"]') #multipath_current_config=$(multipath $interface_if | grep "deactivated") interface_current_config=$(uci -q get openmptcprouter.$OMR_TRACKER_INTERFACE.state || echo "up") diff --git a/omr-quota/files/etc/init.d/omr-quota b/omr-quota/files/etc/init.d/omr-quota index 4ed95c735..37700ff50 100755 --- a/omr-quota/files/etc/init.d/omr-quota +++ b/omr-quota/files/etc/init.d/omr-quota @@ -19,6 +19,7 @@ _launch_quota() { local txquota rxquota ttquota interval enabled interface _validate_section "interface" "$1" interface=$(ifstatus "$1" | jsonfilter -q -e '@["l3_device"]') + [ -n "$(echo $interface | grep '@')" ] && interface=$(ifstatus "$1" | jsonfilter -q -e '@["device"]') [ -z "$interface" ] && return diff --git a/omr-tracker/files/etc/init.d/omr-tracker b/omr-tracker/files/etc/init.d/omr-tracker index 467817e91..67e72a3bc 100755 --- a/omr-tracker/files/etc/init.d/omr-tracker +++ b/omr-tracker/files/etc/init.d/omr-tracker @@ -54,6 +54,7 @@ _launch_tracker() { ifname=$(ifstatus "$1" | jsonfilter -q -e '@["l3_device"]') [ -z "$ifname" ] && ifname=$(ifstatus "$1_4" | jsonfilter -q -e '@["l3_device"]') [ -z "$ifname" ] && config_get ifname "$1" ifname + [ -n "$(echo $ifname | grep '@')" ] && ifname=$(ifstatus "$1" | jsonfilter -q -e '@["device"]') config_get multipath "$1" multipath config_get ifenabled "$1" auto diff --git a/openmptcprouter/files/etc/firewall.gre-tunnel b/openmptcprouter/files/etc/firewall.gre-tunnel index 41b00e664..4d8d450e1 100644 --- a/openmptcprouter/files/etc/firewall.gre-tunnel +++ b/openmptcprouter/files/etc/firewall.gre-tunnel @@ -12,6 +12,7 @@ _setup_routes() { config_get lookup $1 lookup config_get gateway $1 gateway intf=$(ifstatus $1 | jsonfilter -e '@.l3_device' | tr -d "\n") + [ -n "$intf" ] && intf=$(ifstatus "$1" | jsonfilter -q -e '@["device"]' | tr -d "\n") if [ -n "$lookup" ] && [ -n "$intf" ] && [ -n "$gateway" ]; then ip route replace default via $gateway dev $intf table $lookup fi From f60ac82be9ab3327c2c4a067d3709f76967ade82 Mon Sep 17 00:00:00 2001 From: "Ycarus (Yannick Chabanois)" Date: Mon, 15 Feb 2021 19:55:27 +0100 Subject: [PATCH 4/5] Fix IPv6 gateway detection --- omr-tracker/files/bin/omr-tracker | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/omr-tracker/files/bin/omr-tracker b/omr-tracker/files/bin/omr-tracker index 1ca117a82..b046c6500 100755 --- a/omr-tracker/files/bin/omr-tracker +++ b/omr-tracker/files/bin/omr-tracker @@ -241,6 +241,12 @@ while true; do if [ -z "$OMR_TRACKER_DEVICE_GATEWAY6" ] || [ "$OMR_TRACKER_DEVICE_GATEWAY6" = "::" ]; then OMR_TRACKER_DEVICE_GATEWAY6=$(ubus call network.interface.${OMR_TRACKER_INTERFACE} status 2>/dev/null | jsonfilter -q -l 1 -e "@.inactive.route[@.source=\"${OMR_TRACKER_DEVICE_IP6}\"].nexthop" | tr -d "\n") fi + if [ -z "$OMR_TRACKER_DEVICE_GATEWAY6" ] || [ "$OMR_TRACKER_DEVICE_GATEWAY6" = "::" ]; then + OMR_TRACKER_DEVICE_GATEWAY6=$(ubus call network.interface.${OMR_TRACKER_INTERFACE} status 2>/dev/null | jsonfilter -q -l 1 -e "@.inactive.route[@.source=\"${OMR_TRACKER_DEVICE_IP6}/64\"].nexthop" | tr -d "\n") + fi + if [ -z "$OMR_TRACKER_DEVICE_GATEWAY6" ] || [ "$OMR_TRACKER_DEVICE_GATEWAY6" = "::" ]; then + OMR_TRACKER_DEVICE_GATEWAY6=$(ubus call network.interface.${OMR_TRACKER_INTERFACE} status 2>/dev/null | jsonfilter -q -l 1 -e "@.inactive.route[@.source=\"${OMR_TRACKER_DEVICE_IP6}/56\"].nexthop" | tr -d "\n") + fi if [ -z "$OMR_TRACKER_DEVICE_GATEWAY6" ] || [ "$OMR_TRACKER_DEVICE_GATEWAY6" = "::" ]; then OMR_TRACKER_DEVICE_GATEWAY6=$(ubus call network.interface.$OMR_TRACKER_INTERFACE status | jsonfilter -q -l 1 -e '@.route[@.target="::"].nexthop' | tr -d "\n") fi From e7a77db59ebd13cea082aa9aed7fcf6f9fcc8ad2 Mon Sep 17 00:00:00 2001 From: "Ycarus (Yannick Chabanois)" Date: Mon, 15 Feb 2021 19:55:54 +0100 Subject: [PATCH 5/5] Set first boot is over after settings are set --- openmptcprouter/files/etc/init.d/openmptcprouter-vps | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/openmptcprouter/files/etc/init.d/openmptcprouter-vps b/openmptcprouter/files/etc/init.d/openmptcprouter-vps index e299b4a90..265446b56 100755 --- a/openmptcprouter/files/etc/init.d/openmptcprouter-vps +++ b/openmptcprouter/files/etc/init.d/openmptcprouter-vps @@ -1675,7 +1675,6 @@ _config_service() { uci -q commit shadowsocks-libev fi } - [ -n "$vps_config" ] && uci -q set openmptcprouter.settings.firstboot=0 fi if [ "$user_permission" != "ro" ]; then #config_load shadowsocks-libev @@ -1711,6 +1710,8 @@ _config_service() { [ "$error" = 0 ] && { #logger -t "OMR-VPS" "No errors" uci -q set openmptcprouter.${servername}.lastchange=$(date "+%s") + [ -n "$vps_config" ] && uci -q set openmptcprouter.settings.firstboot=0 + } #[ "$error" != 0 ] && logger -t "OMR-VPS" "Error !" uci -q batch <<-EOF >/dev/null