SlackwareThis Forum is for the discussion of Slackware Linux.
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
There are times when both poweroff and halt are needed. Since we have remote KVM access, a "halted' system can be restarted with a Control-Alt-Delete remotely. However a poweroff'ed system requires a site visit.
The convoluted shutdown path (halt and poweroff both call shutdown which runs rc.0 which calls poweroff again, and this time it powers off the system because of the run-level, if ACPI permits). The net effect of this on our hardware is
a) if ACPI is enabled, "shutdown -h", "halt", and "poweroff"
all remove power.
b) if ACPI is disabled, then all of these commands halt the
system.
The problem for me is that I need "halt" to halt the system so C-A-D can reboot it, and I need "poweroff" to remove power.
Before I spin my wheels trying to design a fix for this, has anyone else run into and solved this problem?
--
Distribution: Xubuntu 9.10, Gentoo 2.6.27 (AMD64), Darwin 9.0.0 (arm)
Posts: 1,152
Rep:
shutdown -h and halt are supposed to poweroff the system (I believe just using poweroff itself you may be shutting it down improperly.) by disabling ACPI you remove the computers ability to power itself off. you may be able to edit the shutdown script and comment out the part that calls poweroff. then with ACPI enabled it should halt just like it did without APCI because it won't call poweroff.
I guess I didn't make something clear. I need BOTH poweroff AND halt, depending on the situation.
For example, when the back end SAN is scheduled for maintenance, halting the connected systems is sufficient, and its easy to restart them via remote KVM (using C-A-D) when the SAN people have left the building (and been gone for at least an hour).
However, if a fan failure or an over-temperature condition is detected, powering off the system is the best thing to do to minimize harm to the system.
FYI, poweroff is a symlink to halt, and is processed the same way as "halt -p". Both run the shutdown script /etc/rc.d/rc.0 (unless -[fh] is given), so there is nothing "improper" about poweroff.
Distribution: Xubuntu 9.10, Gentoo 2.6.27 (AMD64), Darwin 9.0.0 (arm)
Posts: 1,152
Rep:
Quote:
Originally Posted by ric
I guess I didn't make something clear. I need BOTH poweroff AND halt, depending on the situation.
For example, when the back end SAN is scheduled for maintenance, halting the connected systems is sufficient, and its easy to restart them via remote KVM (using C-A-D) when the SAN people have left the building (and been gone for at least an hour).
However, if a fan failure or an over-temperature condition is detected, powering off the system is the best thing to do to minimize harm to the system.
FYI, poweroff is a symlink to halt, and is processed the same way as "halt -p". Both run the shutdown script /etc/rc.d/rc.0 (unless -[fh] is given), so there is nothing "improper" about poweroff.
I got that. I'm saying halt is supposed to turn the computer off what you are calling halted is the system stuck in runlevel 0 because it can't turn itself off.
to do what you want you might be able to edit some of your shutdown scripts so that you would have a way to get it to not turn itself off. or go buy one of those thingys that is like a big powerstrip but you control the switch remotely.
I said 'you may be shutting it down improperly.' different things are implimented different ways on different distros. I would have no way of knowing without being in front of a slackware system or knowing from personal experiance. Gentoo doesn't even use the /etc/rc.d init script system. and my man page for power off says:
Quote:
If halt or reboot is called when the system is not in runlevel 0 or 6,
in other words when it's running normally, shutdown will be invoked
instead (with the -h or -r flag).
with poweroff clearly omitted.
The last thing I wanted to do was give you advise that could lead to filesystem corruption.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.