forked from mirrors/nixpkgs
Set the kernel.poweroff_cmd sysctl
This allows Xen (and EC2) to power off an instance properly. We had
this before (see aeb89fc753
), but it got
lost in the systemd migration.
This commit is contained in:
parent
f3bea050f8
commit
c039e286b9
|
@ -22,4 +22,6 @@ with pkgs.lib;
|
|||
'';
|
||||
};
|
||||
|
||||
boot.kernel.sysctl."kernel.poweroff_cmd" = "${config.systemd.package}/sbin/poweroff";
|
||||
|
||||
}
|
||||
|
|
|
@ -33,6 +33,11 @@
|
|||
$machine->waitForUnit("root-swapfile.swap");
|
||||
$machine->succeed("ls -l /root/swapfile | grep 134217728");
|
||||
};
|
||||
|
||||
# Test whether kernel.poweroff_cmd is set.
|
||||
subtest "poweroff_cmd", sub {
|
||||
$machine->succeed("[ -x \"\$(cat /proc/sys/kernel/poweroff_cmd)\" ]")
|
||||
};
|
||||
'';
|
||||
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue