Re: Debian init feature request
You (Bruce Perens) wrote:
> I'd like to add a standardized way to power off the system. How about
> adding the following to the end of /etc/init.d/halt:
> if [ -x /etc/power_off ]; then
> echo "Turning the power off."
> /etc/power_off is provided by the user, and will turn the power off in a
> system-dependent manner, using a UPS or X-10 controller, etc.
I just checked on our Solaris box, and the default way to do this
under Solaris is to change to runlevel 5. However that runlevel is
used as just another runlevel in Debian, since update-rc.d puts the
normal startup links in rc5.d. We could either:
- change update-rc.d, and hope that everybody upgrades update-rc.d
- declare another runlevel for poweroff. 7-9 are undocumented, but legal.
We'd have a similar problem with update-rc.d though, since rc7.d is
empty and it should contains the K* links.
Another runlevel is the way to go, since you could just use
shutdown -t5 -i5 now (-i == runlevel to go to) and the system would
power off. I don't know a simple way to integrate it now, though.
I'm Cc'ing this to debian-devel.
Miquel van | Cistron Internet Services -- Alphen aan den Rijn.
Smoorenburg, | mailto:email@example.com http://www.cistron.nl/
firstname.lastname@example.org | Tel: +31-172-419445 (Voice) 430979 (Fax) 442580 (Data)