Subject: Re: shutdown not works right sometimes?
To: Iain Hibbert <plunky@rya-online.net>
From: Paul de Weerd <paul@mail.me.maar.nu>
List: port-i386
Date: 01/01/2003 10:29:25
On Tue, Dec 31, 2002 at 11:56:35AM +0000, Iain Hibbert wrote:
| Hi, strange problem here.. I am running on an older laptop, the battery
| is buggered so I just have it connected to the mains and shutdown when I'm
| not using it. I am running 1.5.2 which is older too but I'm not about to
| uprade just yet (unless I want to play with bluetooth)
|
| anyway, "shutdown -h now" works from within a shell in an xterm, but not
| direct from the twm menu:
|
| "System Shutdown" f.exec "exec /sbin/shutdown -D -h now >/dev/null"
|
| in fact, it does a "shutdown now" and kills off inetd, cron, xdm and
| syslogd but the system doesnt then run halt or kill the getty running on
| the console (ttyE0), so I have to login and halt manually.. any ideas?
In twm try this with :
"System Shutdown" f.exec "/sbin/shutdown -h now &"
This has worked for me on numerous types of UNIX for years on end now.
I think the '&' is important here, as your shutdown will otherwise run
as a childprocess of twm which gets killed as your machine shuts down.
Hope that helps.
Paul 'WEiRD' de Weerd
--
>++++++++[<++++++++++>-]<+++++++.>+++[<------>-]<.>+++[<+
+++++++++++>-]<.>++[<------------>-]<+.--------------.[-]
http://www.weirdnet.nl/