mirror of
https://github.com/Ysurac/openmptcprouter-feeds.git
synced 2025-03-09 15:40:03 +00:00
Merge branch 'test' into develop
This commit is contained in:
commit
c547939645
9 changed files with 32 additions and 30 deletions
2
.github/workflows/main.yml
vendored
2
.github/workflows/main.yml
vendored
|
@ -8,7 +8,7 @@ jobs:
|
|||
build:
|
||||
strategy:
|
||||
matrix:
|
||||
OMR_TARGET: [bpi-r1, bpi-r2, bpi-r64, rpi2, rpi4, wrt32x, espressobin, r2s, rpi3, wrt3200acm, x86, x86_64, ubnt-erx, r4s, r7800, rutx12, rutx50, r5s, qnap-301w]
|
||||
OMR_TARGET: [bpi-r1, bpi-r2, bpi-r64, rpi2, rpi4, wrt32x, espressobin, r2s, rpi3, wrt3200acm, x86, x86_64, ubnt-erx, r4s, r7800, rutx12, rutx50, r5s, qnap-301w, rpi5]
|
||||
OMR_KERNEL: [5.4, 6.1]
|
||||
runs-on: ubuntu-latest
|
||||
continue-on-error: true
|
||||
|
|
|
@ -898,11 +898,11 @@ if [ "$OMR_TRACKER_STATUS" = "ERROR" ] || [ "$interface_up" != "true" ]; then
|
|||
#ubus call network reload
|
||||
|
||||
# Set a little sleep after an interface error
|
||||
if [ -n "$RANDOM" ]; then
|
||||
sleep `expr $RANDOM % 100`
|
||||
else
|
||||
sleep `awk 'BEGIN{srand();print int(rand()*20)}'`
|
||||
fi
|
||||
# if [ -n "$RANDOM" ]; then
|
||||
# sleep `expr $RANDOM % 100`
|
||||
# else
|
||||
# sleep `awk 'BEGIN{srand();print int(rand()*20)}'`
|
||||
# fi
|
||||
|
||||
exit 0
|
||||
fi
|
||||
|
|
|
@ -19,12 +19,13 @@ setup_interface() {
|
|||
# TODO: apply $broadcast
|
||||
|
||||
local ip_net
|
||||
eval "$(ipcalc.sh "$ip/$mask")";ip_net="$NETWORK"
|
||||
local ip_net IP PREFIX NETWORK NETMASK BROADCAST
|
||||
ipcalc "$ip/$mask" && ip_net="$NETWORK"
|
||||
|
||||
local i
|
||||
for i in $router; do
|
||||
local gw_net
|
||||
eval "$(ipcalc.sh "$i/$mask")";gw_net="$NETWORK"
|
||||
ipcalc "$i/$mask" && gw_net="$NETWORK"
|
||||
|
||||
[ "$ip_net" != "$gw_net" ] && proto_add_ipv4_route "$i" 32 "" "$ip"
|
||||
#[ "$DEFAULTROUTE" = 0 ] || proto_add_ipv4_route 0.0.0.0 0 "$i" "$ip"
|
||||
|
|
|
@ -1,13 +0,0 @@
|
|||
--- a/system-linux.c 2023-09-13 10:44:22.163111635 +0200
|
||||
+++ b/system-linux.c 2023-09-13 10:44:47.562696256 +0200
|
||||
@@ -2720,7 +2720,9 @@
|
||||
system_if_dump_info(struct device *dev, struct blob_buf *b)
|
||||
{
|
||||
__u32 *supported, *advertising, *lp_advertising;
|
||||
- bool rx_pause, tx_pause, pause_autoneg;
|
||||
+ bool rx_pause = false;
|
||||
+ bool tx_pause = false;
|
||||
+ bool pause_autoneg = false;
|
||||
struct {
|
||||
struct ethtool_link_settings req;
|
||||
__u32 link_mode_data[3 * 127];
|
|
@ -2168,12 +2168,12 @@ _config_service() {
|
|||
return
|
||||
fi
|
||||
fi
|
||||
[ "$(uci -q get openmptcprouter.${servername}.get_config)" = "1" ] && [ "$(uci -q get openmptcprouter.${servername}.master)" = "1" ] && {
|
||||
[ "$(uci -q get openmptcprouter.${servername}.get_config)" = "1" ] && ([ "$(uci -q get openmptcprouter.${servername}.master)" = "1" ] || [ "$(uci -q get openmptcprouter.${servername}.current)" = "1" ]) && {
|
||||
_set_config_from_vps
|
||||
_get_gre_tunnel
|
||||
}
|
||||
|
||||
[ "$(uci -q get openmptcprouter.${servername}.master)" = "1" ] && {
|
||||
([ "$(uci -q get openmptcprouter.${servername}.master)" = "1" ] || [ "$(uci -q get openmptcprouter.${servername}.current)" = "1" ]) && {
|
||||
_get_vps_config
|
||||
}
|
||||
|
||||
|
|
|
@ -2244,7 +2244,7 @@ start_instance() {
|
|||
}
|
||||
|
||||
rules_exist() {
|
||||
[ -n "$(iptables -w -t nat -L -n 2>/dev/null | grep v2r_)" ] && return 0
|
||||
[ -n "$(iptables -w -t nat -L -n 2>/dev/null | grep xr_)" ] && return 0
|
||||
return 1
|
||||
}
|
||||
|
||||
|
|
|
@ -8,7 +8,7 @@ include $(TOPDIR)/rules.mk
|
|||
|
||||
PKG_NAME:=z8102
|
||||
PKG_VERSION:=0.1
|
||||
PKG_RELEASE:=1
|
||||
PKG_RELEASE:=2
|
||||
|
||||
PKG_MAINTAINER:=Yannick Chabanois <contact@openmptcprouter.com>
|
||||
|
||||
|
@ -31,8 +31,6 @@ endef
|
|||
|
||||
define Package/z8102/install
|
||||
$(CP) ./files/* $(1)/
|
||||
|
||||
|
||||
endef
|
||||
|
||||
$(eval $(call BuildPackage,z8102))
|
||||
|
|
|
@ -41,7 +41,4 @@ start_service()
|
|||
# run modem 2
|
||||
i=460
|
||||
echo "1" > /sys/class/gpio/gpio${i}/value
|
||||
|
||||
# watchdog
|
||||
/usr/lib/custom/wdg.sh &
|
||||
}
|
||||
|
|
19
z8102/files/etc/init.d/z8102-wdg
Executable file
19
z8102/files/etc/init.d/z8102-wdg
Executable file
|
@ -0,0 +1,19 @@
|
|||
#!/bin/sh /etc/rc.common
|
||||
# Copyright (C) 2013 OpenWrt.org
|
||||
# Copyright (C) 2023 Yannick Chabanois (Ycarus) for OpenMPTCProuter
|
||||
|
||||
START=30
|
||||
USE_PROCD=1
|
||||
|
||||
log() {
|
||||
logger -t "z8102-wdg" "$@"
|
||||
}
|
||||
|
||||
start_service()
|
||||
{
|
||||
# watchdog
|
||||
procd_open_instance
|
||||
procd_set_param command /usr/lib/custom/wdg.sh
|
||||
procd_set_param respawn
|
||||
procd_close_instance
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue