Skip to Content.
Sympa Menu

sm-discuss - Re: [SM-Discuss] Simpleinit/ups shutdown

sm-discuss AT lists.ibiblio.org

Subject: Public SourceMage Discussion List

List archive

Chronological Thread  
  • From: Chris Dombroski <cdombroski AT gambit.gotdns.org>
  • To: SM-Discuss AT lists.ibiblio.org
  • Cc:
  • Subject: Re: [SM-Discuss] Simpleinit/ups shutdown
  • Date: Sat, 13 Dec 2003 14:37:58 -0600

Quoting Chris Dombroski <cdombroski AT gambit.gotdns.org>:

>
> Also, there is the fact that I don't know how to call the kernel power off
> function if there is no need to shutdown the ups (normal system shutdown)

Well, I've found out how to call the kernel power down function. However, I
still have a problem. In my shutdown script that is referenced by
/etc/sysconfig/shutdown I check to see if /etc/killpower (the file nut uses to
note that the ups should be turned off) exists and then turn the ups off if it
does. Otherwise I just power off the system. However, the test, which works
correctly otherwise, always fails and the ups is never turned off. Any help
would be appreciated and rewarded with a spell :)

if [ -e /etc/killpower ]; then
#doesn't get displayed during shutdown for some reason
echo "Shutting down ups..."
upsdrvctl shutdown #tells nut to turn off the ups
fi
sleep 10
upshalt #a short c program that turns the computer off

--
I am a .sig virus. Please reproduce me in your .sig block.

----------------------------------------------------------------
This message was sent using IMP, the Internet Messaging Program.



  • Re: [SM-Discuss] Simpleinit/ups shutdown, Chris Dombroski, 12/13/2003

Archive powered by MHonArc 2.6.24.

Top of Page