Hello community,

here is the log from the commit of package apcupsd for openSUSE:Factory checked 
in at 2014-12-03 22:50:13
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/apcupsd (Old)
 and      /work/SRC/openSUSE:Factory/.apcupsd.new (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Package is "apcupsd"

Changes:
--------
--- /work/SRC/openSUSE:Factory/apcupsd/apcupsd.changes  2014-11-20 
18:43:10.000000000 +0100
+++ /work/SRC/openSUSE:Factory/.apcupsd.new/apcupsd.changes     2014-12-03 
22:50:46.000000000 +0100
@@ -1,0 +2,5 @@
+Tue Dec  2 22:16:05 CET 2014 - sbra...@suse.cz
+
+- Fix removal of HALT_POWERDOWN_INSERT (bsc#907702).
+
+-------------------------------------------------------------------

++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Other differences:
------------------
++++++ apcupsd.spec ++++++
--- /var/tmp/diff_new_pack.I84yhV/_old  2014-12-03 22:50:48.000000000 +0100
+++ /var/tmp/diff_new_pack.I84yhV/_new  2014-12-03 22:50:48.000000000 +0100
@@ -233,13 +233,20 @@
 %if 0%{?suse_version} > 1220
 %{fillup_only}
 %service_add_post %{name}.service
-# Remove HALT_POWERDOWN_INSERT, it is not needed with systemd
-if usr/bin/grep -q '^HALT_POWERDOWN_INSERT="\(/etc/init\.d/apcupsd 
try-powerdown\)"' etc/sysconfig/shutdown ; then
-  usr/bin/sed -i 's:^\(HALT_POWERDOWN_INSERT="\)\(/etc/init\.d/apcupsd 
try-powerdown\)":\1":' etc/sysconfig/shutdown
-else
+# Remove HALT_POWERDOWN_INSERT, it is not needed with systemd (it was last 
time filled in 13.1).
+# We need to handle only the last form, which was already used in SLE11.
+if test -f etc/sysconfig/shutdown ; then
+  if usr/bin/grep -q '^HALT_POWERDOWN_INSERT=' etc/sysconfig/shutdown ; then
+    if ! usr/bin/grep -q '^HALT_POWERDOWN_INSERT=""' etc/sysconfig/shutdown ; 
then
+      if usr/bin/grep -q '^HALT_POWERDOWN_INSERT="/etc/init\.d/apcupsd 
try-powerdown"' etc/sysconfig/shutdown ; then
+        usr/bin/sed -i 's:^\(HALT_POWERDOWN_INSERT="\)/etc/init\.d/apcupsd 
try-powerdown":\1":' etc/sysconfig/shutdown
+      else
   echo >&2 "apcupsd: WARNING: Unknown value of HALT_POWERDOWN_INSERT in 
/etc/sysconfig/shutdown."
-  echo >&2 "         Keeping unchanged. Should be:"
+        echo >&2 "         Keeping unchanged. If it still exists, it should 
be:"
   echo >&2 "HALT_POWERDOWN_INSERT=\"\""
+      fi
+    fi
+  fi
 fi
 # User installed file, by default in docdir. Not needed any more, and will 
never be.
 rm -f etc/init.d/apcupsd-early-powerdown


-- 
To unsubscribe, e-mail: opensuse-commit+unsubscr...@opensuse.org
For additional commands, e-mail: opensuse-commit+h...@opensuse.org

Reply via email to