Skip to content

Commit 94fa28c

Browse files
Update IPv6 script
Signed-off-by: Nicholas Sun <nicholas-sun@outlook.com>
1 parent b608c47 commit 94fa28c

5 files changed

Lines changed: 13 additions & 15 deletions

File tree

.github/workflows/R2S-OpenWrt.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ jobs:
2323
with:
2424
swap-size-mb: 512
2525
temp-reserve-mb: 100
26-
root-reserve-mb: 1280
26+
root-reserve-mb: 2048
2727
remove-dotnet: 'true'
2828
remove-android: 'true'
2929
remove-haskell: 'true'

.github/workflows/R4S-OpenWrt.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ jobs:
2323
with:
2424
swap-size-mb: 512
2525
temp-reserve-mb: 100
26-
root-reserve-mb: 1280
26+
root-reserve-mb: 2048
2727
remove-dotnet: 'true'
2828
remove-android: 'true'
2929
remove-haskell: 'true'

.github/workflows/X86-OpenWrt.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ jobs:
2323
with:
2424
swap-size-mb: 512
2525
temp-reserve-mb: 100
26-
root-reserve-mb: 1280
26+
root-reserve-mb: 2048
2727
remove-dotnet: 'true'
2828
remove-android: 'true'
2929
remove-haskell: 'true'

PATCH/duplicate/files/etc/hotplug.d/iface/99-odhcpd

Lines changed: 9 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -4,16 +4,14 @@
44
[ "$ACTION" = ifupdate -a -z "$IFUPDATE_ADDRESSES" -a -z "$IFUPDATE_DATA" ] && exit 0
55

66
if echo "$INTERFACE" | grep -q "wan" && echo "$INTERFACE" | grep -qv "vap"; then
7-
logger -t odhcpd "Reloading odhcpd due to $ACTION of $INTERFACE ($DEVICE)"
8-
"/etc/init.d/odhcpd" restart
7+
IPV6_REGEX="\(\([0-9A-Fa-f]\{1,4\}:\)\{1,\}\)\(\([0-9A-Fa-f]\{1,4\}\)\{0,1\}\)\(\(:[0-9A-Fa-f]\{1,4\}\)\{1,\}\)"
8+
IPV6_ADDR="$(ip -6 addr show dev "$DEVICE" | grep inet6 | grep -m 1 -o "$IPV6_REGEX")"
9+
LOCK_FILE="/tmp/lock/odhcpd_hotplug_lock"
910

10-
IPV6_REGEX="\(\([0-9A-Fa-f]\{1,4\}:\)\{1,\}\)\(\([0-9A-Fa-f]\{1,4\}\)\{0,1\}\)\(\(:[0-9A-Fa-f]\{1,4\}\)\{1,\}\)"
11-
IPV6_ADDR="$(ip -6 addr show dev "$DEVICE" | grep inet6 | grep -m 1 -o "$IPV6_REGEX")"
12-
LOCK_FILE="/tmp/lock/odhcpd_hotplug_lock"
13-
14-
if [ -n "$IPV6_ADDR" ] && mkdir "$LOCK_FILE" 2>/dev/null; then
15-
"/sbin/ifup" lan
16-
[ -f '/etc/init.d/miniupnpd' ] && "/etc/init.d/miniupnpd" restart
17-
logger -t odhcpd "Reloading lan due to $ACTION of $INTERFACE ($DEVICE)"
18-
fi
11+
if [ -n "$IPV6_ADDR" ] && mkdir "$LOCK_FILE" 2>/dev/null; then
12+
[ -f '/etc/init.d/miniupnpd' ] && "/etc/init.d/miniupnpd" stop 2>&1
13+
"/sbin/ifup" lan 2>&1
14+
[ -f '/etc/init.d/miniupnpd' ] && "/etc/init.d/miniupnpd" start 2>&1 &
15+
logger -t odhcpd "Reloading lan due to $ACTION of $INTERFACE ($DEVICE)"
16+
fi
1917
fi

SCRIPTS/switch

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,4 +8,4 @@
88
#
99
# Change Lines
1010
#
11-
# 1 Oct
11+
# 8 Oct

0 commit comments

Comments
 (0)