Ensure primary network starts at boot

This commit is contained in:
Mikei386
2026-08-22 19:29:32 +02:00
parent ce5bbc2e69
commit 2f3bdde8b0
3 changed files with 15 additions and 1 deletions
+1
View File
@@ -21,6 +21,7 @@ FLUX_MODEL_DIR=/data/models/FLUX.2-klein-4B
# Headless remote recovery. The ASUS UEFI settings documented in # Headless remote recovery. The ASUS UEFI settings documented in
# docs/REMOTE_SITE_CHECKLIST.md are additionally required. # docs/REMOTE_SITE_CHECKLIST.md are additionally required.
ENABLE_HARDWARE_WATCHDOG=true ENABLE_HARDWARE_WATCHDOG=true
PRIMARY_NETWORK_INTERFACE=enp7s0
WAKE_ON_LAN_INTERFACE=enp7s0 WAKE_ON_LAN_INTERFACE=enp7s0
# WireGuard client. The home peer must route 10.77.0.2/32 back to this host. # WireGuard client. The home peer must route 10.77.0.2/32 back to this host.
+3 -1
View File
@@ -22,7 +22,9 @@ für normale Neustarts verwendet werden.
Der Installer aktiviert standardmäßig den vorhandenen SP5100-Hardware-Watchdog Der Installer aktiviert standardmäßig den vorhandenen SP5100-Hardware-Watchdog
mit 60 Sekunden und konfiguriert Wake-on-LAN für das in 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: Vor dem Transport prüfen:
+11
View File
@@ -70,6 +70,17 @@ install_base_packages() {
setup_remote_recovery() { setup_remote_recovery() {
log "Remote-Recovery (Hardware-Watchdog und Wake-on-LAN) konfigurieren" 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 if [[ ${ENABLE_HARDWARE_WATCHDOG:-true} == true ]]; then
[[ -e /dev/watchdog0 || -e /dev/watchdog ]] || \ [[ -e /dev/watchdog0 || -e /dev/watchdog ]] || \
die "Hardware-Watchdog angefordert, aber kein Watchdog-Gerät vorhanden." die "Hardware-Watchdog angefordert, aber kein Watchdog-Gerät vorhanden."