Find the answer to your Linux question:
Results 1 to 2 of 2
Hi all, The place where i stay experiences lot of power cuts and my solaris box is almost always on. It so happens that many times i will not be ...
  1. #1
    Just Joined!
    Join Date
    May 2008
    Posts
    20

    script to poweroff when running on UPS

    Hi all,

    The place where i stay experiences lot of power cuts and my solaris box is almost always on.
    It so happens that many times i will not be around to switch it off as soon as there is a power cut..(i also have UPS which provides alternative supply for 15min)
    So i wanted to write a script that can actually sense a power cut ,or at least sense that the power is being supplied from UPS and then automatically switch off....

    I would like to try and write a script myself ,but dont know where i should start looking for the changes in the parameters when there is a power cut?
    So could you please let me know where i can get these informations from and how i can use it in a script to initiate a shutdown?
    Just a brief overview is sufficient ,as i would like to try writing a script myself...
    If i cannot i will revert back!!!!

    Thanks

  2. #2
    Linux Enthusiast meton_magis's Avatar
    Join Date
    Oct 2006
    Location
    arizona
    Posts
    665
    i have no idea for solaris, but in redhat based systems, in /etc/inittab there is a line for what to do if the UPS goes out. may want to check there.
    New to the internet, technical forums, or the hacker / open source community??
    Read this to learn good posting habits http://www.catb.org/~esr/faqs/smart-questions.html

    RHCE for RHEL version 5
    RHCT for RHEL version 4

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
...