diff --git a/overlay.d/05core/usr/lib/dracut/modules.d/40ignition-ostree/ignition-ostree-populate-var.sh b/overlay.d/05core/usr/lib/dracut/modules.d/40ignition-ostree/ignition-ostree-populate-var.sh index 01212db7d5..6f4e151c92 100755 --- a/overlay.d/05core/usr/lib/dracut/modules.d/40ignition-ostree/ignition-ostree-populate-var.sh +++ b/overlay.d/05core/usr/lib/dracut/modules.d/40ignition-ostree/ignition-ostree-populate-var.sh @@ -33,13 +33,7 @@ for varsubdir in lib log home roothome opt srv usrlocal mnt media; do mkdir -p /sysroot/var/${varsubdir} else systemd-tmpfiles --create --boot --root=/sysroot --prefix="/var/${varsubdir}" - fi - - if [[ $varsubdir == roothome ]]; then - # TODO move this to tmpfiles.d once systemd-tmpfiles handles C! with --root correctly. - # See https://github.com/coreos/fedora-coreos-config/pull/137 - cp /sysroot/etc/skel/.bash* /sysroot/var/${varsubdir} - fi + fi coreos-relabel "/var/${varsubdir}" done diff --git a/overlay.d/05core/usr/lib/tmpfiles.d/root-bash.conf b/overlay.d/05core/usr/lib/tmpfiles.d/root-bash.conf index d5a2d870c2..d59075ba29 100644 --- a/overlay.d/05core/usr/lib/tmpfiles.d/root-bash.conf +++ b/overlay.d/05core/usr/lib/tmpfiles.d/root-bash.conf @@ -1,5 +1,4 @@ -# This really should be C! instead of L, but https://github.com/systemd/systemd/issues/12467 prevents that. -# TODO: switch to C! when https://github.com/systemd/systemd/pull/12750 makes it into fcos -L /var/roothome/.bashrc - - - - /usr/etc/skel/.bashrc -L /var/roothome/.bash_profile - - - - /usr/etc/skel/.bash_profile -L /var/roothome/.bash_logout - - - - /usr/etc/skel/.bash_logout +# Use C! according to https://github.com/coreos/fedora-coreos-config/pull/137/files#diff-4c7caeddac3f43acdf59b41ffa4e3533bb846d2e3bfa31f885a65e9598a2c4a1R1-R2 +C! /var/roothome/.bashrc - - - - /usr/etc/skel/.bashrc +C! /var/roothome/.bash_profile - - - - /usr/etc/skel/.bash_profile +C! /var/roothome/.bash_logout - - - - /usr/etc/skel/.bash_logout