2007/5/13, Eli Barzilay <<a href="mailto:eli@barzilay.org">eli@barzilay.org</a>>:<div><span class="gmail_quote"></span><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
I figure it won't hurt to ask: does anyone know of a way to reboot a<br>linux machine by only creating, deleting, or modifying a file?</blockquote><div><br> </div><br></div>Using Software Suspend (in ACPI configuration menu) in Linux Kernel,
<br><br>echo reboot > /sys/power/disk<br>echo disk > /sys/power/state<br><br>Will cause the system to suspend itself and then reboot.<br>If you use the 'Default resume partition' in kernel configuration or the --resume kernel parameter at boot, and reboot on the same kernel, then the system will resume system and memory after rebooting.
<br>Otherwise, the suspended state will be erased and the system will boot normaly like if you have typed halt, init 6 or telinit 6, except the time spent to save memory onto SWAP partition.<br><br>Maybe there is other options to /sys/power/state in order to tell the kernel you don't want to suspend system, but I don't know them.
<br><br clear="all"><br>-- <br>Cyprien Nicolas<br><a href="mailto:c.nicolas@gmail.com">c.nicolas@gmail.com</a>