~ubuntu-branches/ubuntu/saucy/nut/saucy

« back to all changes in this revision

Viewing changes to man/upssched.conf.5

  • Committer: Bazaar Package Importer
  • Author(s): Arnaud Quette
  • Date: 2004-05-28 13:10:01 UTC
  • mto: (16.1.1 squeeze)
  • mto: This revision was merged to the branch mainline in revision 3.
  • Revision ID: james.westby@ubuntu.com-20040528131001-yj2m9qcez4ya2w14
Tags: upstream-1.4.2
ImportĀ upstreamĀ versionĀ 1.4.2

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
 
.TH UPSSCHED.CONF 5 "Web Feb  6 2002" "" "Network UPS Tools (NUT)"
 
1
.TH UPSSCHED.CONF 5 "Mon Jul 14 2003" "" "Network UPS Tools (NUT)"
2
2
.SH NAME
3
3
upssched.conf \- Configuration for upssched timer program
4
4
 
10
10
.SH CONFIGURATION DIRECTIVES
11
11
 
12
12
.IP "CMDSCRIPT \fIscriptname\fR"
13
 
Required.  This must be above any AT lines.  This script is started to 
 
13
Required.  This must be above any AT lines.  This script is used to 
14
14
invoke commands when your timers are triggered.  It receives a single
15
15
argument which is the name of the timer that caused it to trigger.
16
16
 
20
20
normal users can't create the file, due to the possibility of symlinking
21
21
and other evil.
22
22
.IP
23
 
NOTE: if you are running Solaris or similar, the permissions that upssched
24
 
sets on this file *are not enough* to keep you safe.  If your OS ignores
25
 
the permissions on a FIFO, then you MUST put this in a protected directory!
26
 
.IP
27
 
Another thing to think about: upsmon doesn't run the NOTIFYCMD as root
28
 
unless you run it with -p.  So, upssched will probably run as nobody
29
 
or similar unless you give upsmon another user with -u.  Either way,
30
 
you have to set PIPEFN to something that ONLY the resulting upsmon 
31
 
user can access.
32
 
.IP
33
 
The stock version of this file ships with PIPEFN disabled to make you
34
 
visit this portion of the documentation and think about how your system
35
 
works before potentially opening a hole.
 
23
Note: if you are running Solaris or similar, the permissions that
 
24
upssched sets on this file \fBare not enough\fR to keep you safe.  If
 
25
your OS ignores the permissions on a FIFO, then you MUST put this in a
 
26
protected directory!
 
27
.IP
 
28
Note 2: by default, \fBupsmon\fR(8) will run upssched as whatever user
 
29
you have defined with RUN_AS_USER in \fBupsmon.conf\fR(8).  Make sure
 
30
that user can create files and write to files in the path you use for
 
31
PIPEFN and LOCKFN.
 
32
.IP
 
33
My recommendation: create a special directory for upssched, make it
 
34
owned by your upsmon user, then use it for both.
 
35
.IP
 
36
The stock version of the upssched.conf ships with PIPEFN disabled
 
37
to make you visit this portion of the documentation and think about how
 
38
your system works before potentially opening a security hole.
 
39
 
 
40
.IP "LOCKFN \fIfilename\fR"
 
41
REQUIRED.  This was added after version 1.2.1.
 
42
.IP
 
43
upssched needs to be able to create this filename in order to avoid
 
44
a race condition when two events are dispatched from upsmon at nearly
 
45
the same time.  This file will only exist briefly.  It must not be
 
46
created by any other process.
 
47
.IP
 
48
You should put this in the same directory as PIPEFN.
36
49
 
37
50
.IP "AT \fInotifytype\fR \fIupsname\fR \fIcommand\fR"
38
51
Define a handler for a specific event \fInotifytype\fR on UPS
63
76
.LP
64
77
 
65
78
.IP
66
 
CANCEL-TIMER \fItimername\fR
 
79
CANCEL-TIMER \fItimername\fR [cmd]
67
80
.IP
68
81
.nf
69
 
        Cancel a running timer called <timername>, if possible.
 
82
        Cancel a running timer called <timername>, if possible. 
 
83
        If the timer has passed then pass the optional argument
 
84
        <cmd> to CMDSCRIPT.
70
85
.fi
71
86
.LP
72
87
 
82
97
.LP
83
98
 
84
99
.IP
 
100
EXECUTE \fIcommand\fR
 
101
.IP
 
102
.nf
 
103
        Immediately pass <command> as an argument to CMDSCRIPT.
 
104
.fi
 
105
.LP
 
106
 
 
107
.IP
 
108
Example:
 
109
.IP
 
110
.nf
 
111
        If any UPS (*) reverts to utility power, then execute
 
112
        'ups-back-on-line' via CMDSCRIPT.
 
113
 
 
114
        AT ONLINE * EXECUTE ups-back-on-line
 
115
.fi
 
116
.LP
 
117
 
 
118
.IP
85
119
Note that any AT that matches both the \fInotifytype\fR and the
86
120
\fIupsname\fR for the current event will be used.
87
121
 
89
123
\fBupssched\fR(8), \fBupsmon\fR(8)
90
124
 
91
125
.SS Internet resources:
92
 
The NUT (Network UPS Tools) home page: http://www.exploits.org/nut/
93
 
 
94
 
NUT mailing list archives and information: http://lists.exploits.org/
 
126
The NUT (Network UPS Tools) home page: http://www.networkupstools.org/