[apcupsd/el6] if apcupsd created nologin file, remove it on apcupsd startup (#992991)

Michal Hlavinka mhlavink at fedoraproject.org
Tue Aug 13 13:24:45 UTC 2013


commit ddba1e93af954c952f554012c61dfdb4af08ea44
Author: Michal Hlavinka <mhlavink at redhat.com>
Date:   Tue Aug 13 15:24:35 2013 +0200

    if apcupsd created nologin file, remove it on apcupsd startup (#992991)

 apcupsd-3.14.3-init.patch |    7 ++++---
 apcupsd.spec              |    3 +++
 2 files changed, 7 insertions(+), 3 deletions(-)
---
diff --git a/apcupsd-3.14.3-init.patch b/apcupsd-3.14.3-init.patch
index 7a91715..fda368f 100644
--- a/apcupsd-3.14.3-init.patch
+++ b/apcupsd-3.14.3-init.patch
@@ -22,15 +22,16 @@ diff -up apcupsd-3.14.8/platforms/redhat/apcupsd.in.init apcupsd-3.14.8/platform
  APCPID=@PIDDIR@/apcupsd.pid
  
  # Source function libarary
-@@ -14,7 +24,6 @@ APCPID=@PIDDIR@/apcupsd.pid
+@@ -14,7 +24,7 @@ APCPID=@PIDDIR@/apcupsd.pid
  case "$1" in
      start)
         rm -f @PWRFAILDIR@/powerfail
 -       rm -f @nologdir@/nologin
++       grep -q 'POWER FAILURE' @nologdir@/nologin && rm -f @nologdir@/nologin
         echo -n "Starting UPS monitoring:" 
         daemon @sbindir@/apcupsd -f @sysconfdir@/apcupsd.conf
         RETVAL=$?
-@@ -30,9 +39,11 @@ case "$1" in
+@@ -30,9 +40,11 @@ case "$1" in
         ;;
      restart|force-reload)
         $0 stop
@@ -43,7 +44,7 @@ diff -up apcupsd-3.14.8/platforms/redhat/apcupsd.in.init apcupsd-3.14.8/platform
      reload)
         echo "$0: reload not implemented"
         exit 3
-@@ -48,7 +59,7 @@ case "$1" in
+@@ -48,7 +60,7 @@ case "$1" in
         fi
         ;;
      *)
diff --git a/apcupsd.spec b/apcupsd.spec
index 9d4c4b0..86e5ef5 100644
--- a/apcupsd.spec
+++ b/apcupsd.spec
@@ -175,6 +175,9 @@ fi
 
 
 %changelog
+* Tue Aug 13 2013 Michal Hlavinka <mhlavink at redhat.com> - 3.14.10-1
+- if apcupsd created nologin file, remove it on apcupsd startup (#992991)
+
 * Mon May 28 2012 Michal Hlavinka <mhlavink at redhat.com> - 3.14.9-1
 - apcupsd updated to 3.14.10
 


More information about the scm-commits mailing list