From 543cab8d20984b5c646dfb9c66d8ad167efd0811 Mon Sep 17 00:00:00 2001 From: "Ycarus (Yannick Chabanois)" Date: Mon, 4 Jan 2021 10:58:42 +0100 Subject: [PATCH 1/4] Install BBRv2 package on AMR64 (really) --- openmptcprouter-full/Makefile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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 From 2960b6b5d7ce3e1436fbb0ddd88d836404315d44 Mon Sep 17 00:00:00 2001 From: "Ycarus (Yannick Chabanois)" Date: Mon, 4 Jan 2021 10:59:07 +0100 Subject: [PATCH 2/4] Force ubus path fix --- luci-app-openmptcprouter/root/etc/init.d/openmptcprouter | 9 +++++++++ 1 file changed, 9 insertions(+) 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() { From 517b93f4362b32de8eb9e75907f6e5d69f62762e Mon Sep 17 00:00:00 2001 From: "Ycarus (Yannick Chabanois)" Date: Mon, 4 Jan 2021 11:00:19 +0100 Subject: [PATCH 3/4] Fix omr-update --- omr-update/files/etc/init.d/omr-update | 1 + .../files/etc/uci-defaults/000-omr-update | 18 ++++++++++++++++++ 2 files changed, 19 insertions(+) create mode 100755 openmptcprouter/files/etc/uci-defaults/000-omr-update diff --git a/omr-update/files/etc/init.d/omr-update b/omr-update/files/etc/init.d/omr-update index 6f79dae88..59c131e95 100755 --- a/omr-update/files/etc/init.d/omr-update +++ b/omr-update/files/etc/init.d/omr-update @@ -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/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 From e092f1b2d1a40e15b4bf6923420e2770711884db Mon Sep 17 00:00:00 2001 From: "Ycarus (Yannick Chabanois)" Date: Mon, 4 Jan 2021 16:40:03 +0100 Subject: [PATCH 4/4] Start omr-update after boot script --- omr-update/files/etc/init.d/omr-update | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/omr-update/files/etc/init.d/omr-update b/omr-update/files/etc/init.d/omr-update index 59c131e95..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() {