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.
This commit is contained in:
Bill Nottingham 2011-05-05 16:41:56 -04:00
parent f51d94ff81
commit c3b9ff1829

View File

@ -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 <jskala@redhat.com> - 2.0.9-3
- corrected relase number to be min equal to f15