File: upsd.halt

package info (click to toggle)
upsd 2.6-4
  • links: PTS
  • area: main
  • in suites: sarge
  • size: 224 kB
  • ctags: 112
  • sloc: ansic: 1,040; sh: 333; makefile: 106
file content (15 lines) | stat: -rwxr-xr-x 230 bytes parent folder | download | duplicates (7)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
#!/bin/sh

#  Kill the UPS power if it is in battery.  Delay to allow other
#  machines on the network to complete their shutdowns.

upsd -i-1 /dev/ttyS0

case "$?" in
  101 | 102)
 	sleep 60
	upsd -k /dev/ttyS0
	;;
  *)
	;;
esac