Ensure primary network starts at boot
This commit is contained in:
+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