home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1993 #1 / NN_1993_1.iso / spool / comp / unix / pcclone / 32bit / 995 < prev    next >
Encoding:
Text File  |  1993-01-08  |  1.8 KB  |  46 lines

  1. Newsgroups: comp.unix.pc-clone.32bit
  2. Path: sparky!uunet!gatech!emory!rsiatl!jgd
  3. From: jgd@dixie.com (John De Armond)
  4. Subject: Re: UPS Shutdown Software??
  5. Message-ID: <hr1rrck@dixie.com>
  6. Date: Fri, 08 Jan 93 23:24:36 GMT
  7. Organization: Dixie Communications Public Access.  The Mouth of the South.
  8. Keywords: UPS
  9. References: <C0In2n.IA3@world.std.com>
  10. Lines: 34
  11.  
  12. sandyb@world.std.com (Sandy Bendremer) writes:
  13.  
  14. >I have a Topaz/Square D CUB Powermaker UPS, on a 486 based system running
  15. >SVR4.  The unit is equipped with a DB9 connecter and some simple relays that
  16. >show loss of AC power and low battery.  The manual says that user supplied 
  17. >software and cable are required to make use of this feature.
  18.  
  19. >Is there any simple software kicking around that allows one to use an RS232
  20. >port to monitor the UPS like this.  It seems that some of the standard RS232
  21. >control lines could be used for this purpose.
  22.  
  23. This is too easy to do to need a program.  A simple shell script will
  24. work.  On a spare serial port, connect the power fail contact so that
  25. it raises DCD when it is time to shut the computer down.
  26.  
  27. In a shell script, do approximately the following:
  28.  
  29. echo "foo" >/dev/ttyxx
  30.  
  31. /etc/init 0  (or shutdown or whatever it takes to do it.
  32.  
  33. What happens is the first command blocks on the port until DCD is asserted.
  34. When it is asserted, eg, it is time to shut down, the next command 
  35. makes it happen.  to make absolutely sure this script is always running,
  36. start it from /ect/iniitab with a "respawn" flag.
  37.  
  38.  
  39. John
  40. -- 
  41. John De Armond, WD4OQC               |Interested in high performance mobility?  
  42. Performance Engineering Magazine(TM) | Interested in high tech and computers? 
  43. Marietta, Ga                         | Send ur snail-mail address to 
  44. jgd@dixie.com                        | perform@dixie.com for a free sample mag
  45. Need Usenet public Access in Atlanta?  Write Me for info on Dixie.com.
  46.