LinuxAnswers - the LQ Linux tutorial section.
Go Back > Blogs > trainpic
User Name


Rate this Entry

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:
if grep -q "^button" /etc/modules; then
  head -1 /etc/acpi/event | grep "button/power PWRF" && ipcopreboot down &
Edit /boot/grub/grub.conf
change the following line:
default saved
default 2
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".
Posted in Uncategorized
Views 3355 Comments 0
« Prev     Main     Next »


All times are GMT -5. The time now is 07:59 AM.

Main Menu

Write for LQ is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration