Ensure primary network starts at boot
This commit is contained in:
@@ -21,6 +21,7 @@ FLUX_MODEL_DIR=/data/models/FLUX.2-klein-4B
|
||||
# Headless remote recovery. The ASUS UEFI settings documented in
|
||||
# docs/REMOTE_SITE_CHECKLIST.md are additionally required.
|
||||
ENABLE_HARDWARE_WATCHDOG=true
|
||||
PRIMARY_NETWORK_INTERFACE=enp7s0
|
||||
WAKE_ON_LAN_INTERFACE=enp7s0
|
||||
|
||||
# WireGuard client. The home peer must route 10.77.0.2/32 back to this host.
|
||||
|
||||
@@ -22,7 +22,9 @@ für normale Neustarts verwendet werden.
|
||||
|
||||
Der Installer aktiviert standardmäßig den vorhandenen SP5100-Hardware-Watchdog
|
||||
mit 60 Sekunden und konfiguriert Wake-on-LAN für das in
|
||||
`WAKE_ON_LAN_INTERFACE` genannte Interface. SSH und Docker müssen aktiviert sein.
|
||||
`WAKE_ON_LAN_INTERFACE` genannte Interface. Das primäre Interface wird sowohl
|
||||
beim Boot als auch bei einem später erkannten Kabel aktiviert. SSH und Docker
|
||||
müssen aktiviert sein.
|
||||
|
||||
Vor dem Transport prüfen:
|
||||
|
||||
|
||||
+11
@@ -70,6 +70,17 @@ install_base_packages() {
|
||||
setup_remote_recovery() {
|
||||
log "Remote-Recovery (Hardware-Watchdog und Wake-on-LAN) konfigurieren"
|
||||
|
||||
if [[ -n ${PRIMARY_NETWORK_INTERFACE:-} ]]; then
|
||||
ip link show "$PRIMARY_NETWORK_INTERFACE" >/dev/null 2>&1 || \
|
||||
die "Primäres Netzwerk-Interface existiert nicht: $PRIMARY_NETWORK_INTERFACE"
|
||||
if [[ -f /etc/network/interfaces ]] && \
|
||||
grep -q "^allow-hotplug $PRIMARY_NETWORK_INTERFACE\$" /etc/network/interfaces && \
|
||||
! grep -q "^auto $PRIMARY_NETWORK_INTERFACE\$" /etc/network/interfaces; then
|
||||
sed -i "/^allow-hotplug $PRIMARY_NETWORK_INTERFACE\$/i auto $PRIMARY_NETWORK_INTERFACE" \
|
||||
/etc/network/interfaces
|
||||
fi
|
||||
fi
|
||||
|
||||
if [[ ${ENABLE_HARDWARE_WATCHDOG:-true} == true ]]; then
|
||||
[[ -e /dev/watchdog0 || -e /dev/watchdog ]] || \
|
||||
die "Hardware-Watchdog angefordert, aber kein Watchdog-Gerät vorhanden."
|
||||
|
||||
Reference in New Issue
Block a user