Merge pull request #246082 from ElvishJerricco/exitrd-fix-shutdown-loop

systemd shutdownRamfs: Fix infinite shutdown loop
This commit is contained in:
Florian Klink 2023-07-30 00:11:55 +02:00 committed by GitHub
commit a2a7096157
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 6 additions and 2 deletions

View File

@ -30,7 +30,11 @@ in {
};
config = lib.mkIf cfg.enable {
systemd.shutdownRamfs.contents."/shutdown".source = "${config.systemd.package}/lib/systemd/systemd-shutdown";
systemd.shutdownRamfs.contents = {
"/shutdown".source = "${config.systemd.package}/lib/systemd/systemd-shutdown";
"/etc/initrd-release".source = config.environment.etc.os-release.source;
"/etc/os-release".source = config.environment.etc.os-release.source;
};
systemd.shutdownRamfs.storePaths = [pkgs.runtimeShell "${pkgs.coreutils}/bin"];
systemd.mounts = [{

View File

@ -22,6 +22,6 @@ in {
machine.wait_for_console_text("Unmounting '/oldroot'")
machine.wait_for_console_text("${msg}")
# Don't try to sync filesystems
machine.booted = False
machine.wait_for_shutdown()
'';
})