3
0
Fork 0
forked from mirrors/nixpkgs

* Set /proc/sys/kernel/poweroff_cmd to Upstart's poweroff command

(rather than /sbin/poweroff).  Xen's "xm shutdown" needs this to
  enable the host to cleanly shutdown the guest.

svn path=/nixos/trunk/; revision=24094
This commit is contained in:
Eelco Dolstra 2010-10-05 17:58:58 +00:00
parent 8b5fba4942
commit aeb89fc753

View file

@ -15,4 +15,12 @@
shutdown -r now 'Ctrl-Alt-Delete pressed'
'';
};
system.activationScripts.poweroff =
''
# Allow the kernel to find the poweroff command. This is used
# (for instance) by Xen's "xm shutdown" command to signal a
# guest to shut down cleanly.
echo ${config.system.build.upstart}/sbin/poweroff > /proc/sys/kernel/poweroff_cmd
'';
}