mirror of
https://gitlab.com/fedora/bootc/base-images.git
synced 2026-08-30 21:10:44 +00:00
TPM2 hardware is only on x86_64 and aarch64. Move clevis-pin-tpm2 from the generic packages list to packages-x86_64 and packages-aarch64. Make the dracut config conditional on the binary being present. Ref: https://redhat.atlassian.net/browse/RHEL-138232 Signed-off-by: Joseph Marrero Corchado <jmarrero@redhat.com>
20 lines
695 B
YAML
20 lines
695 B
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/30-bootc-standard.conf << 'EOF'
|
|
add_dracutmodules+=" lvm crypt fips "
|
|
EOF
|
|
# Clevis in initramfs for LUKS auto-unlock.
|
|
# clevis-pin-tpm2 is only on x86_64/aarch64 (TPM2 hardware arches).
|
|
if test -x /usr/bin/clevis-pin-tpm2; then
|
|
cat > /usr/lib/dracut/dracut.conf.d/50-bootc-clevis.conf << 'EOF'
|
|
add_dracutmodules+=" clevis clevis-pin-tpm2 "
|
|
EOF
|
|
else
|
|
cat > /usr/lib/dracut/dracut.conf.d/50-bootc-clevis.conf << 'EOF'
|
|
add_dracutmodules+=" clevis "
|
|
EOF
|
|
fi
|