[BusyBox] Re: poweroff without init not possible?
Kianusch Sayah Karadji
kianusch at sk-tech.net
Tue Sep 23 06:27:24 UTC 2003
On Mon, 22 Sep 2003, Alfred Zastow wrote:
> Kianusch Sayah Karadji wrote:
>
> >>Does someone has a solution?
>
> > Kompile ACPI in your embedded kernel and use ACPI to reboot/halt/poweroff
> > ... but you need to umount the filesystems and stop the processes
> > yourself.
> >
> > And depending on your Hardware ACPI might not work at all.
>
> Thanks, but I have an ACPI enabled system.
>
> Switching off using 'poweroff' isn't a problem when I compile busybox
> with init and when I use this init. But I only want to start a simple
> script. :-(
So just use follwing "script"
#! /bin/sh
echo 5 > /proc/sys/acpi/sleep
to poweroff the system.
Again this only takes care of powering down the system. This does not
unmount any filesystems or shutdown any processes in a save way - so using
this command inproperly may corrupt your system.
AND ... I have not tested this command myself, but according to the ACPI
specifications and Linux documentations this should work - and make sure
to use a recent ACPI implementation on Linux (kernel 2.4.22 would be a
good choise, because 2.4.22 has a pretty recent ACPI Stack)
Grüße
Kianusch
More information about the busybox
mailing list