From 71dcd3339f011119be72a670aa38d74f9614d3c7 Mon Sep 17 00:00:00 2001 From: Bill Nottingham Date: May 05 2011 20:41:56 +0000 Subject: Fix systemd-related scriptlets. 1) Add a trigger to migrate state on upgrade from prior versions 2) Don't try to stop/disable a acpid.socket unit that doesn't exist. --- diff --git a/acpid.spec b/acpid.spec index 90be15d..9e6be8d 100644 --- a/acpid.spec +++ b/acpid.spec @@ -102,8 +102,8 @@ if [ "$1" = "0" ]; then /sbin/service acpid stop >/dev/null 2>&1 /sbin/chkconfig --del acpid - /bin/systemctl disable %{name}.service %{name}.socket > /dev/null 2>&1 || : - /bin/systemctl stop %{name}.service %{name}.socket > /dev/null 2>&1 || : + /bin/systemctl disable %{name}.service > /dev/null 2>&1 || : + /bin/systemctl stop %{name}.service > /dev/null 2>&1 || : fi @@ -115,6 +115,11 @@ if [ "$1" -ge "1" ]; then /bin/systemctl try-restart %{name}.service > /dev/null 2>&1 || : fi +%triggerun -- acpid < 2.0.9 +if /sbin/chkconfig --level 3 acpid ; then + /bin/systemctl enable acpid.service >/dev/null 2>&1 || : +fi + %changelog * Tue May 03 2011 Jiri Skala - 2.0.9-1 - fixes #701340 - CVE-2011-1159 acpid: blocked writes can lead to acpid daemon hang