The `set -euo pipefail` shouldn't be controversial. The `set -x` bit is more debatable because it makes the output more verbose but I find it helpful right now as I comb through all sorts of details as part of https://github.com/coreos/fedora-coreos-tracker/issues/1861. If we care about less verbose output, I'd prefer we keep `-x` but switched to having rpm-ostree buffer postprocess output and only dump it if it fails.
25 lines
1.1 KiB
YAML
25 lines
1.1 KiB
YAML
# Configuration for the initramfs
|
|
postprocess:
|
|
- |
|
|
#!/usr/bin/env bash
|
|
set -xeuo pipefail
|
|
mkdir -p /usr/lib/dracut/dracut.conf.d
|
|
cat > /usr/lib/dracut/dracut.conf.d/20-bootc-base.conf << 'EOF'
|
|
# We want a generic image; hostonly makes no sense as part of a server side build
|
|
hostonly=no
|
|
add_dracutmodules+=" kernel-modules dracut-systemd systemd-initrd base ostree "
|
|
EOF
|
|
cat > /usr/lib/dracut/dracut.conf.d/22-bootc-generic.conf << 'EOF'
|
|
# Extra modules that we want by default that are known to exist in the kernel
|
|
add_dracutmodules+=" virtiofs "
|
|
EOF
|
|
cat > /usr/lib/dracut/dracut.conf.d/49-bootc-tpm2-tss.conf << 'EOF'
|
|
# We want this for systemd-cryptsetup tpm2 locking
|
|
add_dracutmodules+=" tpm2-tss "
|
|
EOF
|
|
cat > /usr/lib/dracut/dracut.conf.d/59-altfiles.conf << 'EOF'
|
|
# https://issues.redhat.com/browse/RHEL-49590
|
|
# On image mode systems we use nss-altfiles for passwd and group,
|
|
# this makes sure dracut uses them which also fixes kdump writing to NFS.
|
|
install_items+=" /usr/lib/passwd /usr/lib/group "
|
|
EOF
|