Package: apcupsd
Version: 3.14.10-2
Severity: normal
Tags: patch upstream

Dear Maintainer,

I noticed apcupsd logs more important messages with lower log level than less 
important ones.
e.g.
LOG_CRIT  "Power failure."
LOG_ALERT "Power is back. UPS running on mains."
Alert is higher than critical according to RFC 5424 p. 6.2.1.

I suggest this patch:

--- action.c.orig       2015-12-18 11:19:29.281371201 +0100
+++ action.c    2015-12-18 11:20:54.453372964 +0100
@@ -61,17 +61,17 @@
  * and the defines in include/apc_defines.h 
  */
 UPSCMDMSG event_msg[] = {
-   {LOG_CRIT,    "Power failure."},
+   {LOG_ALERT,   "Power failure."},
    {LOG_CRIT,    "Running on UPS batteries."},
    {LOG_ALERT,   "Battery power exhausted."},
    {LOG_ALERT,   "Reached run time limit on batteries."},
    {LOG_ALERT,   "Battery charge below low limit."},
    {LOG_ALERT,   "Reached remaining time percentage limit on batteries."},
    {LOG_ALERT,   "Initiating system shutdown!"},
-   {LOG_ALERT,   "Power is back. UPS running on mains."},
-   {LOG_ALERT,   "Users requested to logoff."},
+   {LOG_CRIT,    "Power is back. UPS running on mains."},
+   {LOG_CRIT,    "Users requested to logoff."},
    {LOG_ALERT,   "Battery failure. Emergency."},
-   {LOG_CRIT,    "UPS battery must be replaced."},
+   {LOG_ALERT,   "UPS battery must be replaced."},
    {LOG_CRIT,    "Remote shutdown requested."},
    {LOG_WARNING, "Communications with UPS lost."},
    {LOG_WARNING, "Communications with UPS restored."},



-- System Information:
Debian Release: 7.9
  APT prefers oldstable
  APT policy: (500, 'oldstable')
Architecture: i386 (i686)

Kernel: Linux 3.2.0-4-686-pae (SMP w/2 CPU cores)
Locale: LANG=hu_HU.UTF-8, LC_CTYPE=hu_HU.UTF-8 (charmap=UTF-8)
Shell: /bin/sh linked to /bin/dash

Versions of packages apcupsd depends on:
ii  libc6     2.13-38+deb7u8
ii  libgcc1   1:4.7.2-5
ii  libwrap0  7.6.q-24

Versions of packages apcupsd recommends:
ii  apcupsd-doc  3.14.10-2

Versions of packages apcupsd suggests:
pn  apcupsd-cgi  <none>
ii  udev         175-7.2

-- Configuration Files:
/etc/apcupsd/apcupsd.conf changed [not included]
/etc/apcupsd/killpower changed [not included]
/etc/default/apcupsd changed [not included]

-- no debconf information

Reply via email to