2020-08-10 11:28:19 +02:00
|
|
|
#!/bin/sh
|
|
|
|
exec tail -n +3 $0
|
|
|
|
# On read-only systems /boot/writable provides a writeable
|
|
|
|
# subvolume which also stores the Ignition flag file.
|
|
|
|
set flagpath="/boot/writable"
|
|
|
|
|
|
|
|
# Determine if this is a first boot and set the variable
|
|
|
|
# to be used later on the kernel command line.
|
|
|
|
set ignition_firstboot=""
|
|
|
|
if ! [ -f "${flagpath}/firstboot_happened" ]; then
|
2020-09-11 10:27:57 +02:00
|
|
|
# This defaults to DHCP in dracut
|
|
|
|
set ignition_network_kcmdline=''
|
2020-08-10 11:28:19 +02:00
|
|
|
|
|
|
|
# source in the `ignition.firstboot` file which could override the
|
|
|
|
# above $ignition_network_kcmdline with static networking config.
|
|
|
|
# This override feature is primarily used by coreos-installer to
|
|
|
|
# persist static networking config provided during install to the
|
|
|
|
# first boot of the machine.
|
|
|
|
if [ -e "${flagpath}/ignition.firstboot" ]; then
|
|
|
|
source "${flagpath}/ignition.firstboot"
|
|
|
|
fi
|
|
|
|
|
2023-03-09 18:57:32 +01:00
|
|
|
set ignition_firstboot="ignition.firstboot dasd_mod.dasd=autodetect $ignition_network_kcmdline"
|
2020-08-10 11:28:19 +02:00
|
|
|
fi
|