These are the installation instructions for bpowerd. If you're using RedHat install the RPM and then do steps 6 and 7.

General Installation Instructions

  1. untar/ungzip file to /usr/src and cd to /usr/src/bpowerd-2.0
  2. run ./configure
  3. if you're not sure of the cable quality follow debug instructions.
  4. make
  5. make install
  6. check /etc/inittab to make sure it does what it should. (There should be three lines that look like below. They don't have to be consecutive, just present. Also look in the INSTALL file in /usr/src/bpowerd-2.0, it should have determined the correct location for the bpowerfail script)
    pf::powerfail:/etc/rc.d/init.d/bpowerfail start
    pn::powerfailnow:/etc/rc.d/init.d/bpowerfail now
    pr:12345:powerokwait:/etc/rc.d/init.d/bpowerfail stop
    
  7. run "ln -s <device> /dev/ups" where <device> is the device file of the comm port of you ups:
    port device file
    com 1 /dev/cua0
    com 2 /dev/cua1
    com 3 /dev/cua2
    com 4 /dev/cua3
  8. add a line to your startup script that runs "bpowerd /dev/ups"
  9. add a line to your shutdown script that runs
    	kill -INT `/sbin/pidof bpowerd`
    	while [ "`/sbin/pidof bpowerd`" != "" ]; do
    	   sleep 1;
    	done
    
  10. edit /etc/rc.d/init.d/bpowerfail to have appropriate shutdown times


Debug Instructions

  1. make debug
  2. plug a lamp or some other load into the UPS and put an extension cord or powerstrip between the UPS and the outlet (DO NOT just unplug the UPS to test it)
  3. do step 7 of above. Instructions.
  4. run "/usr/src/bpowerd-2.0/bpowerdebug /dev/ups"
  5. turn off the power to the UPS and see if the messages change
  6. When you've tested powerfail and low battery do the rest of the general installation and then restart the computer and test again to make sure shutdowns are actually scheduled.
  7. When confident of the performance hook the UPS to the wall and the computer to the UPS.
SourceForge
                      Logo