IPCop shutdown with power button
Posted 08-22-2006 at 10:23 AM by trainpic
I recently installed ipcop on an older Gateway desktop to firewall our new broadband connection. This computer has no keyboard, monitor or mouse. So, without logging remotely, how do you implement a clean shutdown??
I found a clever hack on a german IPCop forum. (Hooray for Google Translate).
Add the following lines to /etc/rc.d/rc.local:
<!--break-->
Edit /boot/grub/grub.conf
change the following line:
to:
to boot the ACPI enabled the kernel.
once you manually reboot, pressing the power button will automatically shutdown the computer.
Note that this should also work with any Linux distribution, simply make sure that grub boots and ACPI enabled kernel and change "ipcopreboot down" to something like "shutdown -h now".
I found a clever hack on a german IPCop forum. (Hooray for Google Translate).
Add the following lines to /etc/rc.d/rc.local:
<!--break-->
Code:
if grep -q "^button" /etc/modules; then head -1 /etc/acpi/event | grep "button/power PWRF" && ipcopreboot down & fi
change the following line:
Code:
default saved
Code:
default 2
once you manually reboot, pressing the power button will automatically shutdown the computer.
Note that this should also work with any Linux distribution, simply make sure that grub boots and ACPI enabled kernel and change "ipcopreboot down" to something like "shutdown -h now".