diff --git a/dracut/99switch-root/module-setup.sh b/dracut/99switch-root/module-setup.sh index 251b3b6..2592747 100755 --- a/dracut/99switch-root/module-setup.sh +++ b/dracut/99switch-root/module-setup.sh @@ -13,4 +13,9 @@ install() { "${systemdsystemunitdir}/initrd-parse-etc.service.d/override.conf" inst_simple "${moddir}/nocgroup.conf" \ "/etc/systemd/system.conf.d/nocgroup.conf" + + # Ensure sysctl is run again after switching root to pick up any sysctl + # files that are deliberately missing from the initrd. + inst_simple "${moddir}/rerun.conf" \ + "${systemdsystemunitdir}/systemd-sysctl.service.d/rerun.conf" } diff --git a/dracut/99switch-root/rerun.conf b/dracut/99switch-root/rerun.conf new file mode 100644 index 0000000..74ae991 --- /dev/null +++ b/dracut/99switch-root/rerun.conf @@ -0,0 +1,2 @@ +[Service] +RemainAfterExit=no