diff --git a/luci-app-openmptcprouter/root/etc/init.d/openmptcprouter b/luci-app-openmptcprouter/root/etc/init.d/openmptcprouter index 63d4d3a3a..2348fa8b0 100755 --- a/luci-app-openmptcprouter/root/etc/init.d/openmptcprouter +++ b/luci-app-openmptcprouter/root/etc/init.d/openmptcprouter @@ -104,6 +104,15 @@ start_service() { # remove sysctl already defined in /etc/sysctl.d/ sed -i -e '/tcp_fin_timeout/d' -e '/tcp_keepalive_time/d' -e '/nf_conntrack_max/d' -e '/tcp_syn_retries/d' -e '/tcp_fastopen/d' -e '/tcp_retries2/d' -e '/tcp_retries1/d' -e '/ip_default_ttl/d' /etc/sysctl.conf sed -i -e '/tcp_fin_timeout/d' -e '/tcp_keepalive_time/d' -e '/nf_conntrack_max/d' -e '/tcp_syn_retries/d' -e '/tcp_fastopen/d' -e '/tcp_retries2/d' -e '/tcp_retries1/d' -e '/ip_default_ttl/d' /etc/sysctl.d/10-default.conf + + if [ "$(uci -q get rpcd.@rpcd[0].socket)" != "/var/run/ubus/ubus.sock" ]; then + uci -q batch <<-EOF >/dev/null + set rpcd.@rpcd[0].socket='/var/run/ubus/ubus.sock' + commit rpcd + EOF + /etc/init.d/rpcd restart 2>&1 >/dev/null + fi + } reload_service() { diff --git a/omr-update/files/etc/init.d/omr-update b/omr-update/files/etc/init.d/omr-update index 6f79dae88..d69c779f8 100755 --- a/omr-update/files/etc/init.d/omr-update +++ b/omr-update/files/etc/init.d/omr-update @@ -2,7 +2,7 @@ # Copyright (C) 2018 Ycarus (Yannick Chabanois) # Released under GPL 3. See LICENSE for the full terms. -START=1 +START=11 STOP=98 boot() { @@ -16,6 +16,7 @@ boot() { [ -n "$files" ] && { mkdir -p /usr/share/omr-update if [ "$(grep rom /etc/mtab)" = "" ]; then + rm /usr/share/omr-update/* cp /etc/uci-defaults/* /usr/share/omr-update fi uci -q set openmptcprouter.settings=settings diff --git a/openmptcprouter-full/Makefile b/openmptcprouter-full/Makefile index d3b617dd3..defb4d7b4 100644 --- a/openmptcprouter-full/Makefile +++ b/openmptcprouter-full/Makefile @@ -78,7 +78,7 @@ MY_DEPENDS := \ !TARGET_mvebu:kmod-usb-net-huawei-cdc-ncm !TARGET_mvebu:kmod-usb-net-rndis !TARGET_mvebu:kmod-usb-net-cdc-ether !TARGET_mvebu:kmod-usb-net-ipheth !TARGET_mvebu:usbmuxd \ kmod-rt2800-usb kmod-rtl8xxxu kmod-rtl8192cu kmod-net-rtl8192su \ !TARGET_mvebu:luci-proto-qmi wpad-basic kmod-mt7601u kmod-rtl8187 \ - luci-app-mlvpn mlvpn 464xlat !TARGET_mvebu:kmod-usb-net-smsc75xx kmod-zram kmod-swconfig swconfig kmod-ipt-nat kmod-ipt-nat6 luci-app-https-dns-proxy kmod-tcp-nanqinlang (TARGET_x86_64||TARGET_aarch64):kmod-tcp-bbr2 iptables-mod-ipopt igmpproxy ss iptraf-ng \ + luci-app-mlvpn mlvpn 464xlat !TARGET_mvebu:kmod-usb-net-smsc75xx kmod-zram kmod-swconfig swconfig kmod-ipt-nat kmod-ipt-nat6 luci-app-https-dns-proxy kmod-tcp-nanqinlang (TARGET_x86_64||aarch64):kmod-tcp-bbr2 iptables-mod-ipopt igmpproxy ss iptraf-ng \ luci-app-acl block-mount blockd fstools luci-app-shutdown libwebp luci-proto-gre tcptraceroute luci-proto-mbim kmod-rtl8xxxu kmod-ath9k-htc luci-app-ttyd luci-mod-dashboard (TARGET_x86||TARGET_x86_64):rtl8192eu-firmware kmod-usb2 libustream-wolfssl (TARGET_x86||TARGET_x86_64):kmod-ixgbevf \ hwinfo (TARGET_x86||TARGET_x86_64):dmidecode luci-app-packet-capture kmod-bonding luci-proto-bonding # luci-theme-bootstrap luci-theme-openwrt-2020 luci-theme-openwrt luci-app-status diff --git a/openmptcprouter/files/etc/uci-defaults/000-omr-update b/openmptcprouter/files/etc/uci-defaults/000-omr-update new file mode 100755 index 000000000..6e16cc6b0 --- /dev/null +++ b/openmptcprouter/files/etc/uci-defaults/000-omr-update @@ -0,0 +1,18 @@ +#!/bin/sh + +cd /etc/uci-defaults || exit 0 +source /etc/os-release + +OMRVERSION=$(echo $VERSION | sed 's/v//') +files="$(ls /etc/uci-defaults/)" +[ -n "$files" ] && { + mkdir -p /usr/share/omr-update + if [ "$(grep rom /etc/mtab)" = "" ]; then + rm /usr/share/omr-update/* + cp /etc/uci-defaults/* /usr/share/omr-update + fi + uci -q set openmptcprouter.settings=settings + uci -q set openmptcprouter.settings.version=${OMRVERSION} + uci -q commit +} +exit 0