Skip to content

Commit

Permalink
sync (#381)
Browse files Browse the repository at this point in the history
  • Loading branch information
suyuan168 authored Nov 16, 2023
2 parents 07312c5 + a4cd28a commit afa95fc
Show file tree
Hide file tree
Showing 7 changed files with 32 additions and 30 deletions.
10 changes: 5 additions & 5 deletions mptcp/files/usr/share/omr/post-tracking.d/001-post-tracking
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
8 changes: 4 additions & 4 deletions netifd/Makefile
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
include $(TOPDIR)/rules.mk

PKG_NAME:=netifd
PKG_RELEASE:=3
PKG_RELEASE:=1

PKG_SOURCE_PROTO:=git
PKG_SOURCE_URL=$(PROJECT_GIT)/project/netifd.git
PKG_SOURCE_DATE:=2023-08-31
PKG_SOURCE_VERSION:=1a07f1dff32b3af49e39533e33e8964b59535662
PKG_MIRROR_HASH:=dc621dd04c3c9631002f929cf10a4620f57af8b0baf614c590bda17957fa6201
PKG_SOURCE_DATE:=2023-11-10
PKG_SOURCE_VERSION:=35facc8306f590a7330789ab6d5785c0d43073ef
PKG_MIRROR_HASH:=4f73591ae1873e18df235349e478f2196ca0d3123c313a04149dc9d5e2bfb403
PKG_MAINTAINER:=Felix Fietkau <[email protected]>

PKG_LICENSE:=GPL-2.0
Expand Down
5 changes: 3 additions & 2 deletions netifd/files/lib/netifd/dhcp.script
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down
13 changes: 0 additions & 13 deletions netifd/patches/001-init-pause.patch

This file was deleted.

4 changes: 1 addition & 3 deletions z8102/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -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 <[email protected]>

Expand All @@ -31,8 +31,6 @@ endef

define Package/z8102/install
$(CP) ./files/* $(1)/


endef

$(eval $(call BuildPackage,z8102))
3 changes: 0 additions & 3 deletions z8102/files/etc/init.d/z8102
Original file line number Diff line number Diff line change
Expand Up @@ -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 changes: 19 additions & 0 deletions z8102/files/etc/init.d/z8102-wdg
Original file line number Diff line number Diff line change
@@ -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
}

0 comments on commit afa95fc

Please sign in to comment.