[apcupsd/el6] suppress error message when /etc/nologin does not exist

Michal Hlavinka mhlavink at fedoraproject.org
Thu Feb 27 09:04:29 UTC 2014


commit 0f9c4506c11e42feeb1a2161df5a66be64252ff2
Author: Michal Hlavinka <mhlavink at redhat.com>
Date:   Thu Feb 27 10:05:18 2014 +0100

    suppress error message when /etc/nologin does not exist

 apcupsd-3.14.3-init.patch |    2 +-
 apcupsd.spec              |    5 ++++-
 2 files changed, 5 insertions(+), 2 deletions(-)
---
diff --git a/apcupsd-3.14.3-init.patch b/apcupsd-3.14.3-init.patch
index fda368f..4ecf04a 100644
--- a/apcupsd-3.14.3-init.patch
+++ b/apcupsd-3.14.3-init.patch
@@ -27,7 +27,7 @@ diff -up apcupsd-3.14.8/platforms/redhat/apcupsd.in.init apcupsd-3.14.8/platform
      start)
         rm -f @PWRFAILDIR@/powerfail
 -       rm -f @nologdir@/nologin
-+       grep -q 'POWER FAILURE' @nologdir@/nologin && rm -f @nologdir@/nologin
++       grep -s -q 'POWER FAILURE' @nologdir@/nologin && rm -f @nologdir@/nologin
         echo -n "Starting UPS monitoring:" 
         daemon @sbindir@/apcupsd -f @sysconfdir@/apcupsd.conf
         RETVAL=$?
diff --git a/apcupsd.spec b/apcupsd.spec
index fce4ebd..08a7ee4 100644
--- a/apcupsd.spec
+++ b/apcupsd.spec
@@ -1,6 +1,6 @@
 Name:         apcupsd
 Version:      3.14.10
-Release:      2%{?dist}
+Release:      3%{?dist}
 Summary:      APC UPS Power Control Daemon for Linux
 
 Group:        System Environment/Daemons
@@ -175,6 +175,9 @@ fi
 
 
 %changelog
+* Thu Feb 27 2014 Michal Hlavinka <mhlavink at redhat.com> - 3.14.10-3
+- suppress error message when /etc/nologin does not exist
+
 * Tue Aug 13 2013 Michal Hlavinka <mhlavink at redhat.com> - 3.14.10-2
 - if apcupsd created nologin file, remove it on apcupsd startup (#992991)
 


More information about the scm-commits mailing list