LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Slackware
User Name
Password
Slackware This Forum is for the discussion of Slackware Linux.

Notices


Reply
  Search this Thread
Old 04-04-2013, 10:22 AM   #1
xj25vm
Member
 
Registered: Jun 2008
Posts: 393

Rep: Reputation: 68
/etc/acpi/acpi_handler.sh 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/acpi_handler.sh doesn't leave any traces in the logs - unlike "/sbin/shutdown -h now" - or similar.

I was wondering why the default acpi_handler.sh 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?
 
Old 04-04-2013, 10:41 AM   #2
guanx
Senior Member
 
Registered: Dec 2008
Posts: 1,183

Rep: Reputation: 237Reputation: 237Reputation: 237
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.
 
Old 04-07-2013, 04:10 AM   #3
xj25vm
Member
 
Registered: Jun 2008
Posts: 393

Original Poster
Rep: Reputation: 68
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.
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
exec of init (/sbin/init) failed!!! Permission dened kernel-panic - not syncing! charlztin88 Linux - Newbie 1 03-15-2011 03:17 PM
Root ShelI Change - changed /etc/passwd /sbin/sh to /sbin/bash and gave No Shell mn35 Solaris / OpenSolaris 13 04-13-2010 04:24 AM
/sbin/init: Kernel panic - not syncing: Attempted to kill init! jalejo08 Linux - Kernel 7 07-02-2009 01:16 PM
Chkroot scan - /sbin/init & /sbin/ifconfig INFECTED bicoba Linux - Security 4 06-07-2006 09:16 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Slackware

All times are GMT -5. The time now is 02:40 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration