1
0
Fork 0
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:
suyuan 2023-11-18 13:29:13 +08:00
commit c547939645
9 changed files with 32 additions and 30 deletions

View file

@ -8,7 +8,7 @@ jobs:
build: build:
strategy: strategy:
matrix: 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] OMR_KERNEL: [5.4, 6.1]
runs-on: ubuntu-latest runs-on: ubuntu-latest
continue-on-error: true continue-on-error: true

View file

@ -898,11 +898,11 @@ if [ "$OMR_TRACKER_STATUS" = "ERROR" ] || [ "$interface_up" != "true" ]; then
#ubus call network reload #ubus call network reload
# Set a little sleep after an interface error # Set a little sleep after an interface error
if [ -n "$RANDOM" ]; then # if [ -n "$RANDOM" ]; then
sleep `expr $RANDOM % 100` # sleep `expr $RANDOM % 100`
else # else
sleep `awk 'BEGIN{srand();print int(rand()*20)}'` # sleep `awk 'BEGIN{srand();print int(rand()*20)}'`
fi # fi
exit 0 exit 0
fi fi

View file

@ -19,12 +19,13 @@ setup_interface() {
# TODO: apply $broadcast # TODO: apply $broadcast
local ip_net 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 local i
for i in $router; do for i in $router; do
local gw_net 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" [ "$ip_net" != "$gw_net" ] && proto_add_ipv4_route "$i" 32 "" "$ip"
#[ "$DEFAULTROUTE" = 0 ] || proto_add_ipv4_route 0.0.0.0 0 "$i" "$ip" #[ "$DEFAULTROUTE" = 0 ] || proto_add_ipv4_route 0.0.0.0 0 "$i" "$ip"

View file

@ -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];

View file

@ -2168,12 +2168,12 @@ _config_service() {
return return
fi fi
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 _set_config_from_vps
_get_gre_tunnel _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 _get_vps_config
} }

View file

@ -2244,7 +2244,7 @@ start_instance() {
} }
rules_exist() { 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 return 1
} }

View file

@ -8,7 +8,7 @@ include $(TOPDIR)/rules.mk
PKG_NAME:=z8102 PKG_NAME:=z8102
PKG_VERSION:=0.1 PKG_VERSION:=0.1
PKG_RELEASE:=1 PKG_RELEASE:=2
PKG_MAINTAINER:=Yannick Chabanois <contact@openmptcprouter.com> PKG_MAINTAINER:=Yannick Chabanois <contact@openmptcprouter.com>
@ -31,8 +31,6 @@ endef
define Package/z8102/install define Package/z8102/install
$(CP) ./files/* $(1)/ $(CP) ./files/* $(1)/
endef endef
$(eval $(call BuildPackage,z8102)) $(eval $(call BuildPackage,z8102))

View file

@ -41,7 +41,4 @@ start_service()
# run modem 2 # run modem 2
i=460 i=460
echo "1" > /sys/class/gpio/gpio${i}/value echo "1" > /sys/class/gpio/gpio${i}/value
# watchdog
/usr/lib/custom/wdg.sh &
} }

View 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
}