-   Slackware (
-   -   /etc/acpi/ uses /sbin/init instead of /sbin/shutdown (

xj25vm 04-04-2013 11:22 AM

/etc/acpi/ uses /sbin/init instead of /sbin/shutdown
I've only noticed this recently when troubleshooting shutdowns (or lack off - as I thought at the time) on an auto pc using Slackware. I couldn't find the shutdowns in the logs - so I assumed the special auto power supply wasn't shutting the computer down properly - just turning the power off and crashing it. Then I discovered that "/sbin/init 0", called from /etc/acpi/ doesn't leave any traces in the logs - unlike "/sbin/shutdown -h now" - or similar.

I was wondering why the default script shipped with Slackware doesn't use /sbin/shutdown. It seems neater, it writes stuff to the logs, it takes care of /etc/rc.d/rc.local_shutdown and various other niceties.

Than again - maybe that's how things come from upstream - or maybe there is some other sensible reason for things to be the way they are now?

guanx 04-04-2013 11:41 AM

I remember one of the two choices will produce unexpected behavior when invoked multiple times (e.g. by pressing the power button more than once before the system is down). So many years passed and I cannot remember which. Just have a try.

xj25vm 04-07-2013 05:10 AM

I just tried it on one of my machines. Changed "/sbin/init 0" into "/sbin/shutdown -h now" and pressed the power button several times quickly. I didn't notice any strange behaviour. Maybe the problem manifests itself only on occasion, or only on particular setups? I've restarted the machine and tried again several times.

All times are GMT -5. The time now is 07:15 AM.