Messages in this thread | | | Date | Mon, 7 Apr 97 20:46:55 EDT | From | Tom Dyas <> | Subject | Re: Rebooting and APM halt |
| |
> I've noticed since the new reboot changes were put into 2.1.30 that my laptop > compiled with CONFIG_APM_POWER_OFF no longer turns off when I do a halt. > What program will give the correct sequence of stuff in linux/kernel/sys.c > to actually halt and power off the system?
The change was first made in the SPARC tree since the notions of "halt" and "power off" are very different. On a SPARC, "halt" returns the system to monitor mode while "power off" shuts off the system. Many other systems make the same distinction.
As a temporary fix, change the call to the reboot() system call in your halt program to the following and recompile:
#include <linux/reboot.h>
...
reboot(LINUX_REBOOT_MAGIC1, LINUX_REBOOT_MAGIC2, LINUX_REBOOT_CMD_POWER_OFF);
And name this new binary "poweroff" or something close.
What should really happen is that the SysVInit maintainer whoever he is should add a "power down" runlevel just like most other Unix systems like Solaris have.
Tom
| |