mirror of
https://github.com/ilyakooo0/nixpkgs.git
synced 2024-09-11 07:15:54 +03:00
systemd shutdownRamfs: Fix infinite shutdown loop
This commit is contained in:
parent
66ce081faf
commit
4ecd0c119a
@ -30,7 +30,11 @@ in {
|
|||||||
};
|
};
|
||||||
|
|
||||||
config = lib.mkIf cfg.enable {
|
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.shutdownRamfs.storePaths = [pkgs.runtimeShell "${pkgs.coreutils}/bin"];
|
||||||
|
|
||||||
systemd.mounts = [{
|
systemd.mounts = [{
|
||||||
|
@ -22,6 +22,6 @@ in {
|
|||||||
machine.wait_for_console_text("Unmounting '/oldroot'")
|
machine.wait_for_console_text("Unmounting '/oldroot'")
|
||||||
machine.wait_for_console_text("${msg}")
|
machine.wait_for_console_text("${msg}")
|
||||||
# Don't try to sync filesystems
|
# Don't try to sync filesystems
|
||||||
machine.booted = False
|
machine.wait_for_shutdown()
|
||||||
'';
|
'';
|
||||||
})
|
})
|
||||||
|
Loading…
Reference in New Issue
Block a user