Use new systemd macros (Resolves: #850303)
This commit is contained in:
parent
be646a723a
commit
925b1a4f23
47
rwall.spec
47
rwall.spec
@ -83,29 +83,41 @@ make INSTALLROOT=${RPM_BUILD_ROOT} install
|
||||
install -m 755 %{SOURCE1} ${RPM_BUILD_ROOT}%{_unitdir}/
|
||||
|
||||
%post server
|
||||
if [ $1 = 1 ]; then
|
||||
/bin/systemctl daemon-reload >/dev/null 2>&1 || :
|
||||
fi
|
||||
%if 0%{?systemd_post:1}
|
||||
%systemd_post rwalld.service
|
||||
%else
|
||||
if [ $1 = 1 ]; then
|
||||
/bin/systemctl daemon-reload >/dev/null 2>&1 || :
|
||||
fi
|
||||
|
||||
# Package with native systemd unit file is installed for the first time
|
||||
%triggerun -- rwall-server < 0.17-33
|
||||
%{_bindir}/systemd-sysv-convert --save rwalld >/dev/null 2>&1 ||:
|
||||
# Package with native systemd unit file is installed for the first time
|
||||
%triggerun -- rwall-server < 0.17-33
|
||||
%{_bindir}/systemd-sysv-convert --save rwalld >/dev/null 2>&1 ||:
|
||||
|
||||
# Run these because the SysV package being removed won't do them
|
||||
/sbin/chkconfig --del rwalld >/dev/null 2>&1 || :
|
||||
/bin/systemctl try-restart rwalld.service >/dev/null 2>&1 || :
|
||||
# Run these because the SysV package being removed won't do them
|
||||
/sbin/chkconfig --del rwalld >/dev/null 2>&1 || :
|
||||
/bin/systemctl try-restart rwalld.service >/dev/null 2>&1 || :
|
||||
%endif
|
||||
|
||||
%preun server
|
||||
if [ $1 = 0 ]; then
|
||||
/bin/systemctl --no-reload disable rwalld.service >/dev/null 2>&1 || :
|
||||
/bin/systemctl stop rwalld.service >/dev/null 2>&1 || :
|
||||
fi
|
||||
%if 0%{?systemd_preun:1}
|
||||
%systemd_preun rwalld.service
|
||||
%else
|
||||
if [ $1 = 0 ]; then
|
||||
/bin/systemctl --no-reload disable rwalld.service >/dev/null 2>&1 || :
|
||||
/bin/systemctl stop rwalld.service >/dev/null 2>&1 || :
|
||||
fi
|
||||
%endif
|
||||
|
||||
%postun server
|
||||
/bin/systemctl daemon-reload >/dev/null 2>&1 || :
|
||||
if [ $1 -ge 1 ]; then
|
||||
/bin/systemctl try-restart rwalld.service >/dev/null 2>&1 || :
|
||||
fi
|
||||
%if 0%{?systemd_postun_with_restart:1}
|
||||
%systemd_postun_with_restart rwalld.service
|
||||
%else
|
||||
/bin/systemctl daemon-reload >/dev/null 2>&1 || :
|
||||
if [ $1 -ge 1 ]; then
|
||||
/bin/systemctl try-restart rwalld.service >/dev/null 2>&1 || :
|
||||
fi
|
||||
%endif
|
||||
|
||||
%files
|
||||
%{_bindir}/rwall
|
||||
@ -121,6 +133,7 @@ fi
|
||||
* Tue Sep 11 2012 Honza Horak <hhorak@redhat.com> - 0.17-34
|
||||
- added ordering dependencies to rpcbind
|
||||
- Minor spec file changes
|
||||
- Use new systemd macros (Resolves: #850303)
|
||||
|
||||
* Mon Aug 01 2011 Honza Horak <hhorak@redhat.com> - 0.17-33
|
||||
- added systemd native unit file
|
||||
|
Loading…
Reference in New Issue
Block a user