From ee6b9db384ee81e3dfbc4e84c0c4c31b62410697 Mon Sep 17 00:00:00 2001 From: Bill Nottingham Date: Thu, 5 May 2011 16:34:53 -0400 Subject: [PATCH] Fix systemd scriptlets. 1) Don't always enable the service - only run 'systemctl enable' on initial package install 2) Add a trigger to catch the case where we are upgrading from a pre-systemd version. --- gpm.spec | 16 ++++++++++++++-- 1 file changed, 14 insertions(+), 2 deletions(-) diff --git a/gpm.spec b/gpm.spec index 7efaded..092272f 100644 --- a/gpm.spec +++ b/gpm.spec @@ -1,7 +1,7 @@ Summary: A mouse server for the Linux console Name: gpm Version: 1.20.6 -Release: 15%{?dist} +Release: 16%{?dist} License: GPLv2+ Group: System Environment/Daemons URL: http://www.nico.schottelius.org/software/gpm/ @@ -113,13 +113,22 @@ rm -rf %{buildroot} %post %ifnarch s390 s390x /sbin/chkconfig --add gpm -/bin/systemctl enable gpm.service >/dev/null 2>&1 || : +if [ "$1" -ge 1 ]; then + /bin/systemctl enable gpm.service >/dev/null 2>&1 || : +fi %endif if [ -e %{_infodir}/gpm.info.gz ]; then /sbin/install-info %{_infodir}/gpm.info.gz %{_infodir}/dir || : fi /sbin/ldconfig +%ifnarch s390 s390x +%triggerun -- gpm < 1.20.6-15 +if /sbin/chkconfig --level 3 gpm ; then + /bin/systemctl enable gpm.service >/dev/null 2>&1 || : +fi +%endif + %preun %ifnarch s390 s390x if [ $1 = 0 ]; then @@ -173,6 +182,9 @@ fi %{_libdir}/libgpm.a %changelog +* Thu May 05 2011 Bill Nottingham 1.20.6-16 +- Fix systemd scriptlets + * Tue Feb 08 2011 Fedora Release Engineering - 1.20.6-15 - Rebuilt for https://fedoraproject.org/wiki/Fedora_15_Mass_Rebuild