APM patch for sysvinit (poweroff)

APM patch for sysvinit (poweroff)

Post by Lesli » Thu, 01 Jul 1999 04:00:00



hello!
I am looking for a patch to let sysvinit tools shut down
my box, running 2.2.10 kernel.

any link?

thx

 
 
 

APM patch for sysvinit (poweroff)

Post by Allin Cottrel » Thu, 01 Jul 1999 04:00:00



> I am looking for a patch to let sysvinit tools shut down
> my box, running 2.2.10 kernel.

In rc.0, replace

  command="halt"

with

  command="halt -p"

APM must be enabled in the kernel build.

--
Allin Cottrell
Department of Economics
Wake Forest University, NC

 
 
 

APM patch for sysvinit (poweroff)

Post by Andr » Fri, 02 Jul 1999 04:00:00




> > I am looking for a patch to let sysvinit tools shut down
> > my box, running 2.2.10 kernel.

> In rc.0, replace

>   command="halt"

> with

>   command="halt -p"

I tried "halt -p" and "poweroff" as root on the console but it only did

a usual halt, even if both manpage and halt --help said there is such

an option -p

My kernel is built with apm support. Any idea whats wrong?

greets
-andre

.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.
         ~andre~perrot~

                               powered by linux 2.2.10
.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.

 
 
 

APM patch for sysvinit (poweroff)

Post by Thorsten Hei » Mon, 05 Jul 1999 04:00:00


Quote:> > In rc.0, replace

> >   command="halt"

> > with

> >   command="halt -p"

> I tried "halt -p" and "poweroff" as root on the console but it only did

> a usual halt, even if both manpage and halt --help said there is such

> an option -p

> My kernel is built with apm support. Any idea whats wrong?

The system normally executes the rc0.d's halt script when typing "halt" or
"poweroff" on the command line. Because the script normally contains
the "halt" command to stop your system, you should replace it by
"halt -p" or "poweroff", and your Linux box should then be able to turn
power off via software.

Thorsten

 
 
 

1. PATCH: apm.c - detection of brokern APM Idle call implementation


Well, the following three-liners (+ comments) seems to do it. It checks
if clock was advanced after return from APM Idle - if not we assume BIOS
did not halt CPU and do it ourselves. The addidional condition &&
!current->need_resched is for the case when BIOS did halt CPU and
non-clock interrupt happened that waked up somebody else. But may be I
am just plain paranoid. The code has no impact for "BIOS slows CPU"
case.

It works here for broken BIOS. I appreciate if people with good BIOS
test it.

-andrej

  apm-idle-2.diff
< 1K Download

2. Redhat Newbie

3. PATCH: apm.c - runtime parameter for APM Idle call

4. Printer -- Cannon BJ200e

5. apm/poweroff and modules.conf

6. suid bit in shell - Security problem?

7. APM poweroff under Linux 2.4.7 / 2.4.2 RH 7.1

8. Filesystem woes (directories which believe they are /dev files...)

9. poweroff does not power my box off, even with APM enabled

10. APM: Halt crashes when trying to poweroff.

11. APM Poweroff on AMD results in kernel oops!

12. APM realmode poweroff

13. New APM BIOS patches