Re: Standardize shutdown of the system from enviroment control

From: Aaron Young
Date: Tue Aug 09 2005 - 16:37:32 EST


>
>
> On Tue, 9 Aug 2005, Christoph Hellwig wrote:
>
> > Currently snsc_event for Altix systems sends SIGPWR to init (and abuses
> > tasklist_lock..) while the sbus drivers call execve for /sbin/shutdown
> > (which is also ugly, it should at least use call_usermodehelper)
> > With normal sysvinit both will end up the same, but I suspect the
> > shutdown variant, maybe with a sysctl to chose the exact path to call
> > would be cleaner. What do you guys think about adding a common function
> > to do this.
>
> Sounds reasonable to me. I'll copy Aaron Young, who I think
> actually wrote the code to send the SIGPWR, in case he had a Good
> Reason for doing it this way. (Aaron, if I'm remembering wrong
> and you're not the guy who wrote this, let me know...)

Yep, that was me. I couldn't really find a better way to do it at
the time. An 'execve shutdown' probably would have been better in retrospect
because I think sending SIGPWR to init doesn't always shutdown the machine.
It depends on how some config files are setup (inittab, powerfail).
I'd rather not depend on any config files and just force a shutdown/poweroff.

>
> > Could you test such a patch for me?
>
> Sure. I'll need to get hold of some hardware/firmware that will
> reproduce a critical environmental situation... Might take a
> litte while...

Testing should be easy - on a Deskside Prism system, just hit the
power button while up at Linux.
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/