Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
View | Details | Raw Unified | Return to bug 7778 | Differences between
and this patch

Collapse All | Expand All

(-)apcupsd.old/apcupsd.conf (-4 / +4 lines)
Lines 16-22 Link Here
16
#            940-15(24C) |
16
#            940-15(24C) |
17
#            ether, usb ]
17
#            ether, usb ]
18
# defines the type of cable that you have.
18
# defines the type of cable that you have.
19
UPSCABLE smart
19
UPSCABLE usb
20
#
20
#
21
# UPSTYPE [ backups | sharebasic | netups |
21
# UPSTYPE [ backups | sharebasic | netups |
22
#           backupspro | smartvsups |
22
#           backupspro | smartvsups |
Lines 26-32 Link Here
26
# *** NEW TYPES FOR GENERIC DRIVERS ***
26
# *** NEW TYPES FOR GENERIC DRIVERS ***
27
# UPSTYPE [ dumb | apcsmart | net | usb | snmp ]
27
# UPSTYPE [ dumb | apcsmart | net | usb | snmp ]
28
# defines the type of UPS you have.
28
# defines the type of UPS you have.
29
UPSTYPE smartups
29
UPSTYPE usb
30
#
30
#
31
#
31
#
32
#DEVICE <string> /dev/<serial port>
32
#DEVICE <string> /dev/<serial port>
Lines 44-54 Link Here
44
#                                    the UPS device: can be "APC" or "RFC"
44
#                                    the UPS device: can be "APC" or "RFC"
45
#                                    where APC is the powernet MIB and RFC
45
#                                    where APC is the powernet MIB and RFC
46
#                                    is the IETF's standardized UPS-MIB.
46
#                                    is the IETF's standardized UPS-MIB.
47
DEVICE /dev/ttyS0
47
DEVICE /dev/usb/hid/hiddev[0-9]
48
#
48
#
49
#LOCKFILE <path to lockfile>
49
#LOCKFILE <path to lockfile>
50
# path for serial port lock file
50
# path for serial port lock file
51
LOCKFILE /var/lock
51
LOCKFILE /var/lock/subsys
52
#
52
#
53
#
53
#
54
#
54
#
(-)apcupsd.old/changeme (-1 / +3 lines)
Lines 12-19 Link Here
12
MSG="$HOSTNAME UPS battery needs changing NOW."
12
MSG="$HOSTNAME UPS battery needs changing NOW."
13
#
13
#
14
(
14
(
15
   echo "Subject: $MSG"
16
   echo " "
15
   echo "$MSG"
17
   echo "$MSG"
16
   echo " "
18
   echo " "
17
   /usr/sbin/apcaccess status
19
   /usr/sbin/apcaccess status
18
) | $MAIL -s "$MSG" $SYSADMIN
20
) | $MAIL $SYSADMIN
19
exit 0
21
exit 0
(-)apcupsd.old/commfailure (-1 / +3 lines)
Lines 12-19 Link Here
12
MSG="$HOSTNAME Serial port communications with UPS lost"
12
MSG="$HOSTNAME Serial port communications with UPS lost"
13
#
13
#
14
(
14
(
15
   echo "Subject: $MSG"
16
   echo " "
15
   echo "$MSG"
17
   echo "$MSG"
16
   echo " "
18
   echo " "
17
   /usr/sbin/apcaccess status
19
   /usr/sbin/apcaccess status
18
) | $MAIL -s "$MSG" $SYSADMIN
20
) | $MAIL $SYSADMIN
19
exit 0
21
exit 0
(-)apcupsd.old/commok (-1 / +3 lines)
Lines 12-19 Link Here
12
MSG="$HOSTNAME Serial port communications with UPS restored"
12
MSG="$HOSTNAME Serial port communications with UPS restored"
13
#
13
#
14
(
14
(
15
   echo "Subject: $MSG"
16
   echo " "
15
   echo "$MSG"
17
   echo "$MSG"
16
   echo " "
18
   echo " "
17
   /usr/sbin/apcaccess status
19
   /usr/sbin/apcaccess status
18
) | $MAIL -s "$MSG" $SYSADMIN
20
) | $MAIL $SYSADMIN
19
exit 0
21
exit 0
(-)apcupsd.old/mainsback (-1 / +3 lines)
Lines 12-19 Link Here
12
MSG="$HOSTNAME Power has returned"
12
MSG="$HOSTNAME Power has returned"
13
#
13
#
14
(
14
(
15
   echo "Subject: $MSG"
16
   echo " "
15
   echo "$MSG"
17
   echo "$MSG"
16
   echo " "
18
   echo " "
17
   /usr/sbin/apcaccess status
19
   /usr/sbin/apcaccess status
18
) | $MAIL -s "$MSG" $SYSADMIN
20
) | $MAIL $SYSADMIN
19
exit 0
21
exit 0
(-)apcupsd.old/masterconnect (-1 / +3 lines)
Lines 12-19 Link Here
12
MSG="slave $HOSTNAME received connection from master"
12
MSG="slave $HOSTNAME received connection from master"
13
#
13
#
14
(
14
(
15
   echo "Subject: $MSG"
16
   echo " "
15
   echo "$MSG"
17
   echo "$MSG"
16
   echo " "
18
   echo " "
17
   /usr/sbin/apcaccess status
19
   /usr/sbin/apcaccess status
18
) | $MAIL -s "$MSG" $SYSADMIN
20
) | $MAIL $SYSADMIN
19
exit 0
21
exit 0
(-)apcupsd.old/mastertimeout (-1 / +3 lines)
Lines 12-19 Link Here
12
MSG="slave $HOSTNAME lost contact with master"
12
MSG="slave $HOSTNAME lost contact with master"
13
#
13
#
14
(
14
(
15
   echo "Subject: $MSG"
16
   echo " "
15
   echo "$MSG"
17
   echo "$MSG"
16
   echo " "
18
   echo " "
17
   /usr/sbin/apcaccess status
19
   /usr/sbin/apcaccess status
18
) | $MAIL -s "$MSG" $SYSADMIN
20
) | $MAIL $SYSADMIN
19
exit 0
21
exit 0
(-)apcupsd.old/onbattery (-1 / +3 lines)
Lines 12-19 Link Here
12
MSG="$HOSTNAME Power Failure !!!"
12
MSG="$HOSTNAME Power Failure !!!"
13
#
13
#
14
(
14
(
15
   echo "Subject: $MSG"
16
   echo " "
15
   echo "$MSG"
17
   echo "$MSG"
16
   echo " "
18
   echo " "
17
   /usr/sbin/apcaccess status
19
   /usr/sbin/apcaccess status
18
) | $MAIL -s "$MSG" $SYSADMIN
20
) | $MAIL $SYSADMIN
19
exit 0
21
exit 0

Return to bug 7778