From: Cameron K. <cam...@pa...> - 2002-11-30 10:06:20
|
Hmmm, is it possible for UML to be able to catch signals such as HUP, INT, TERM, and have it tell init to change to the halt level? This would be useful if the host were to shutdown without having any UML instances being shutdown first. Alternatively, being able to initiate a _graceful_ shutdown using uml_mconsole would be useful, for when terminals fail to come up for whatever reason, and you can't ssh or similar to the host. -- Cameron Kerr Email: cam...@pa... Website: http://nzgeeks.org/cameron/ |
From: Nick Craig-W. <nc...@ax...> - 2002-11-30 10:54:07
|
On Sat, Nov 30, 2002 at 11:04:52PM +1300, Cameron Kerr wrote: > Alternatively, being able to initiate a _graceful_ shutdown using > uml_mconsole would be useful, for when terminals fail to come up for > whatever reason, and you can't ssh or similar to the host. You can do this already. First put a line line this in the /etc/inittab of the UML # Trap CTRL-ALT-DELETE ca::ctrlaltdel:/sbin/shutdown -t3 -h now ("init q" to get init to reload that file) Most distros have a line like that except it says -r not -h - change it to -h. Then use uml_mconsole to send a "cad" (control-alt-delete) and presto a clean shutdown. If that doesn't work (init not working for some reason) then this provides a reasonably clean shutdown :- uml_mconsole foo "sysrq s" sleep 1 uml_mconsole foo "sysrq u" sleep 1 uml_mconsole foo "halt" Provided you've got magic sysreq build into your UML kernel. -- Nick Craig-Wood nc...@ax... |