Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions dracut/99flatcar-debloat/module-setup.sh
Original file line number Diff line number Diff line change
Expand Up @@ -18,4 +18,8 @@ install() {

# We maybe should include this, but more work is needed for compliance.
rm "${initdir}"/usr/lib*/ossl-modules/fips.so

# drop it when updating to dracut 110
inst_libdir_file "libaudit.so*"
inst_libdir_file "libseccomp.so*"
}
10 changes: 4 additions & 6 deletions dracut/99setup-root/initrd-setup-root
Original file line number Diff line number Diff line change
Expand Up @@ -32,8 +32,8 @@ COREOS_BLANK_MACHINE_ID="42000000000000000000000000000042"
MACHINE_ID_FILE="/sysroot/etc/machine-id"

# Allow to rerun the script
if SYSTEMD_IN_INITRD=0 systemd-confext --root=/sysroot status | grep flatcar-default; then
SYSTEMD_IN_INITRD=0 systemd-confext --root=/sysroot unmerge
if systemd-confext --root=/sysroot status | grep flatcar-default; then
systemd-confext --root=/sysroot unmerge
fi

function selectiveosreset() {
Expand Down Expand Up @@ -165,10 +165,8 @@ mkdir -p /sysroot/var/lib/extensions.mutable/
if [ ! -L /sysroot/var/lib/extensions.mutable/etc ] && [ ! -e /sysroot/var/lib/extensions.mutable/etc ]; then
ln -s /etc /sysroot/var/lib/extensions.mutable/etc
fi
# Workaround until 259: Set SYSTEMD_IN_INITRD because even with --root=
# this would otherwise look for initrd extension metadata.
SYSTEMD_IN_INITRD=0 systemd-confext --root=/sysroot merge
SYSTEMD_IN_INITRD=0 systemd-confext --root=/sysroot status | grep flatcar-default || { echo "error: flatcar-default confext not loaded" ; exit 1 ; }
systemd-confext --root=/sysroot merge
systemd-confext --root=/sysroot status | grep flatcar-default || { echo "error: flatcar-default confext not loaded" ; exit 1 ; }
# Even when the planned sysext/confext .services units are there
# the above call should stay because we first need confext for Ignition
# to have default files but then we need to reload for any user confexts
Expand Down
4 changes: 2 additions & 2 deletions dracut/99setup-root/initrd-setup-root-after-ignition
Original file line number Diff line number Diff line change
Expand Up @@ -168,11 +168,11 @@ for NAME in $(grep -h -o '^[^#]*' /sysroot/etc/flatcar/enabled-sysext.conf /sysr
done

# Here we load a second time so that any user-supplied configuration extensions are present at boot
SYSTEMD_IN_INITRD=0 systemd-confext --root=/sysroot refresh
systemd-confext --root=/sysroot refresh
# Then for the first time we can also apply system extensions so that the final system has them at boot
# (done here until we have an upstream systemd unit doing it).
if [ $(readlink -f /sysroot/etc/systemd/system/systemd-sysext.service 2>/dev/null) != "/dev/null" ]; then
if ! SYSTEMD_IN_INITRD=0 systemd-sysext --root=/sysroot merge ; then
if ! systemd-sysext --root=/sysroot merge ; then
echo "ERROR: systemd-sysext failed to set up extensions in initrd, continuing boot" >&2
fi
fi
Expand Down
2 changes: 0 additions & 2 deletions dracut/99switch-root/nocgroup.conf
Original file line number Diff line number Diff line change
@@ -1,7 +1,5 @@
[Manager]
DefaultCPUAccounting=no
DefaultIOAccounting=no
DefaultIPAccounting=no
DefaultBlockIOAccounting=no
DefaultMemoryAccounting=no
DefaultTasksAccounting=no