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
14
gpm.spec
14
gpm.spec
@ -1,7 +1,7 @@
|
|||||||
Summary: A mouse server for the Linux console
|
Summary: A mouse server for the Linux console
|
||||||
Name: gpm
|
Name: gpm
|
||||||
Version: 1.20.6
|
Version: 1.20.6
|
||||||
Release: 15%{?dist}
|
Release: 16%{?dist}
|
||||||
License: GPLv2+
|
License: GPLv2+
|
||||||
Group: System Environment/Daemons
|
Group: System Environment/Daemons
|
||||||
URL: http://www.nico.schottelius.org/software/gpm/
|
URL: http://www.nico.schottelius.org/software/gpm/
|
||||||
@ -113,13 +113,22 @@ rm -rf %{buildroot}
|
|||||||
%post
|
%post
|
||||||
%ifnarch s390 s390x
|
%ifnarch s390 s390x
|
||||||
/sbin/chkconfig --add gpm
|
/sbin/chkconfig --add gpm
|
||||||
|
if [ "$1" -ge 1 ]; then
|
||||||
/bin/systemctl enable gpm.service >/dev/null 2>&1 || :
|
/bin/systemctl enable gpm.service >/dev/null 2>&1 || :
|
||||||
|
fi
|
||||||
%endif
|
%endif
|
||||||
if [ -e %{_infodir}/gpm.info.gz ]; then
|
if [ -e %{_infodir}/gpm.info.gz ]; then
|
||||||
/sbin/install-info %{_infodir}/gpm.info.gz %{_infodir}/dir || :
|
/sbin/install-info %{_infodir}/gpm.info.gz %{_infodir}/dir || :
|
||||||
fi
|
fi
|
||||||
/sbin/ldconfig
|
/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
|
%preun
|
||||||
%ifnarch s390 s390x
|
%ifnarch s390 s390x
|
||||||
if [ $1 = 0 ]; then
|
if [ $1 = 0 ]; then
|
||||||
@ -173,6 +182,9 @@ fi
|
|||||||
%{_libdir}/libgpm.a
|
%{_libdir}/libgpm.a
|
||||||
|
|
||||||
%changelog
|
%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
|
* 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
|
- Rebuilt for https://fedoraproject.org/wiki/Fedora_15_Mass_Rebuild
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user