Initial import from bf-network-r6.opencode — opencode migration
This commit is contained in:
15
switch/recovery/switch-recovery-ip.sh
Normal file
15
switch/recovery/switch-recovery-ip.sh
Normal file
@@ -0,0 +1,15 @@
|
||||
#!/bin/sh
|
||||
# Recovery-Anker: Zweit-IP 192.168.1.2/24 auf en0, damit der Mac mini den
|
||||
# ALL-SG8316M nach einem Firmware-Flash (Reset auf 192.168.1.1) erreichen kann.
|
||||
# Wird per LaunchDaemon bei jedem Boot ausgeführt (retry bis en0 da ist).
|
||||
IFACE=en0
|
||||
IP=192.168.1.2
|
||||
MASK=255.255.255.0
|
||||
i=0
|
||||
while [ "$i" -lt 10 ]; do
|
||||
if ifconfig "$IFACE" >/dev/null 2>&1; then
|
||||
ifconfig "$IFACE" alias "$IP" "$MASK" 2>/dev/null && exit 0
|
||||
fi
|
||||
i=$((i+1)); sleep 3
|
||||
done
|
||||
exit 1
|
||||
Reference in New Issue
Block a user