rockylinux-ostree-config/overlay.d/05core/usr/libexec/coreos-ignition-firstboot-complete
2022-10-18 11:48:48 -04:00

20 lines
643 B
Bash
Executable File

#!/bin/bash
set -euo pipefail
mount -o remount,rw /boot
# We're done provisioning. Remove the whole /boot/ignition directory if present,
# which may include a baked Ignition config. See
# https://github.com/coreos/fedora-coreos-tracker/issues/889.
rm -rf /boot/ignition
# Regarding the lack of `-f` for rm ; we should have only run if GRUB detected
# this file. Fail if we are unable to remove it, rather than risking rerunning
# Ignition at next boot.
rm /boot/ignition.firstboot
# rdcore zipl checks for /boot/ignition.firstboot
if [[ $(uname -m) = s390x ]]; then
/usr/lib/dracut/modules.d/50rdcore/rdcore zipl --boot-mount=/boot
fi