From c3b9ff1829e26578ccbfb0e10c6299fafc6d5667 Mon Sep 17 00:00:00 2001 From: Bill Nottingham Date: May 06 2011 16:01:45 +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 9759e6a..5f316e9 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-3 - corrected relase number to be min equal to f15