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.
This commit is contained in:
parent
d67d2d6e8b
commit
ee6b9db384
16
gpm.spec
16
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 <notting@redhat.com> 1.20.6-16
|
||||
- Fix systemd scriptlets
|
||||
|
||||
* Tue Feb 08 2011 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 1.20.6-15
|
||||
- Rebuilt for https://fedoraproject.org/wiki/Fedora_15_Mass_Rebuild
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user