mwan3: move command definitions to common.sh
authorFlorian Eckert <redacted>
Tue, 8 Mar 2022 09:15:04 +0000 (10:15 +0100)
committerFlorian Eckert <redacted>
Mon, 14 Mar 2022 08:34:49 +0000 (09:34 +0100)
Signed-off-by: Florian Eckert <redacted>
net/mwan3/files/etc/hotplug.d/iface/15-mwan3
net/mwan3/files/etc/init.d/mwan3
net/mwan3/files/lib/mwan3/common.sh
net/mwan3/files/lib/mwan3/mwan3.sh
net/mwan3/files/usr/libexec/rpcd/mwan3
net/mwan3/files/usr/sbin/mwan3
net/mwan3/files/usr/sbin/mwan3rtmon

index 7c107fc01494c0cca087965aa80d64dc9701ab9a..6eac6309aa7c5c33f953f7eaa59e6a84c7c16ae8 100644 (file)
@@ -3,7 +3,6 @@
 . /lib/functions.sh
 . /lib/functions/network.sh
 . /lib/mwan3/mwan3.sh
-. /lib/mwan3/common.sh
 
 initscript=/etc/init.d/mwan3
 . /lib/functions/procd.sh
index 560621516657df0fd3ad51e55bbebbd09c22efa9..47980ef65ca11af86e556a51a67a565ebe58c916 100755 (executable)
@@ -1,6 +1,5 @@
 #!/bin/sh /etc/rc.common
 
-. "${IPKG_INSTROOT}/lib/mwan3/common.sh"
 . "${IPKG_INSTROOT}/lib/functions/network.sh"
 . "${IPKG_INSTROOT}/lib/mwan3/mwan3.sh"
 
index 33a94ae86252f160f6a4969453c44b56750ee2dc..5f08fdfa5af4f10a0e50a8eb94189a7cf3fcfc55 100644 (file)
@@ -21,6 +21,12 @@ MAX_SLEEP=$(((1<<31)-1))
 command -v ip6tables > /dev/null
 NO_IPV6=$?
 
+IPS="ipset"
+IPT4="iptables -t mangle -w"
+IPT6="ip6tables -t mangle -w"
+IPT4R="iptables-restore -T mangle -w -n"
+IPT6R="ip6tables-restore -T mangle -w -n"
+
 LOG()
 {
        local facility=$1; shift
index a3a5ac89b50b20405920e8042c246e196a1948ed..59ae1e60793be024576e531b15493c87b83da411 100644 (file)
@@ -1,12 +1,8 @@
 #!/bin/sh
 
 . "${IPKG_INSTROOT}/usr/share/libubox/jshn.sh"
+. "${IPKG_INSTROOT}/lib/mwan3/common.sh"
 
-IPS="ipset"
-IPT4="iptables -t mangle -w"
-IPT6="ip6tables -t mangle -w"
-IPT4R="iptables-restore -T mangle -w -n"
-IPT6R="ip6tables-restore -T mangle -w -n"
 CONNTRACK_FILE="/proc/net/nf_conntrack"
 IPv6_REGEX="([0-9a-fA-F]{1,4}:){7,7}[0-9a-fA-F]{1,4}|"
 IPv6_REGEX="${IPv6_REGEX}([0-9a-fA-F]{1,4}:){1,7}:|"
index 4c71fa18f46f1d7d42806ca2e3fc77b181babbdc..8b336a450ed34357d5eac8225196510df664b141 100755 (executable)
@@ -5,10 +5,6 @@
 . /usr/share/libubox/jshn.sh
 . /lib/mwan3/common.sh
 
-IPS="ipset"
-IPT4="iptables -t mangle -w"
-IPT6="ip6tables -t mangle -w"
-
 report_connected_v4() {
        local address
 
index 1ba6004bb4f5a65ad0d9910419bdeb36ba1e9c2a..ea3d4c6a7485ea1fd8d176d7757d9ad4ab592f39 100755 (executable)
@@ -4,7 +4,6 @@
 . /usr/share/libubox/jshn.sh
 . /lib/functions/network.sh
 . /lib/mwan3/mwan3.sh
-. /lib/mwan3/common.sh
 
 command_help() {
        local cmd="$1"
index 06be43597103c5f738f6a947928d46771a0e8385..b7f03cc8746c6c1a615e526bdeab40cd30d063f4 100755 (executable)
@@ -3,7 +3,6 @@
 . /lib/functions.sh
 . /lib/functions/network.sh
 . /lib/mwan3/mwan3.sh
-. /lib/mwan3/common.sh
 
 trap_with_arg()
 {
git clone https://git.99rst.org/PROJECT