File: README.Debian

package info (click to toggle)
powstatd 1.4.1-4
  • links: PTS
  • area: main
  • in suites: potato
  • size: 200 kB
  • ctags: 75
  • sloc: ansic: 905; sh: 229; makefile: 137
file content (82 lines) | stat: -rw-r--r-- 3,330 bytes parent folder | download | duplicates (3)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
powstatd for Debian
-------------------

Powstatd for Debian comes in two favours: the regular powstatd package and
the non-us section powstatd-crypt package.  Use the powstatd package if
your UPS feeds power to a single computer.  If a single UPS feeds power to
many computers (one connected to the UPS via a serial cable and running
powstatd in master mode, and one or more others running powstatd in slave
mode to get power-line status from the master computer) then consider using
powstatd-crypt if you are on an unsecure network and want to avoid the
possibility of a cracker forcing a shutdown of your slave computers by
faking power failure signals from the master computer.

----------

Quickstart:

After installing the powstatd package, you must configure it by editing the
file /etc/powstatd.conf to suit your UPS and serial line, and then remove
the line:

#!Unconfigured! Please customize the file as appropriate and remove this line

The daemon /etc/init.d/powstatd won't start until that "Unconfigured"
comment is removed.

See the powstatd (8) man page for help on configuring /etc/powstatd.conf.
The directory /usr/share/doc/powstatd/ contains a few powstatd.conf sample
files.  If you get this software working with a different UPS models,
please let me know and I will include your conf file as another example and
I will forward it upstream.

After your conf file is correctly setup, you may then start the powstatd
daemon by executing, as root:

# /etc/init.d/powstatd start

You may also want to edit /etc/init.d/powerfail at the line:

 failtime=+5     # shutdown delay from initial power failure

It sets the shutdown delay to 5 minutes after power line failure detection.
You may want to increase that if your UPS has lots of power to spare, or
reduce it.

----------

The package differs from the upstream installation in a few ways:

 _ Added the #!Unconfigured! comment in /etc/powstatd.conf to avoid
   starting an unconfigured daemon. 

 - Upstream wants /etc/inittab to have the following lines:

    # UPS signals a power outage.
    pf:12345:powerfail:/sbin/powstatd.fail
    # UPS signals power restored before the shutdown kicks in.
    pr:12345:powerokwait:/sbin/powstatd.ok
    # UPS signals low battery power: emergency shutdown.
    pn:12345:powerfailnow:/sbin/powstatd.low

   On Debian, the calls are to a single script with differing arguments:

    # What to do when the power fails/returns.
    pf::powerwait:/etc/init.d/powerfail start
    pn::powerfailnow:/etc/init.d/powerfail now
    po::powerokwait:/etc/init.d/powerfail stop

   I have therefore created a /etc/init.d/powerfail script which combines
   the actions of the 3 upstream scripts.

 - The scripts /etc/init.d/powstatd and /etc/init.d/powerfail are written
   for Debian; We don't use the upstream /sbin/powstatd.{fail|low|ok}
   scripts for compatibility with Debian's inittab. The upstream
   /etc/init.d/powstatd script (to start and stop the powstatd daemon)
   shuts down the UPS when called with the "stop" argument (by sending a
   `powstatd -k` signal).  On Debian, we simply shut down the daemon on
   "stop"; Killing the UPS is done in /etc/init.d/halt by calling the same
   script (symlinked to "ups-monitor") with the "poweroff" option.


Peter S Galbraith <psg@debian.org>, Mon, 23 Aug 1999 12:58:55 -0400