use systemd instead of xinetd as a default
This commit is contained in:
parent
15a26fcde8
commit
791eded5c9
26
tftp.spec
26
tftp.spec
@ -1,7 +1,9 @@
|
||||
%global systemctl_bin /usr/bin/systemctl
|
||||
|
||||
Summary: The client for the Trivial File Transfer Protocol (TFTP)
|
||||
Name: tftp
|
||||
Version: 5.2
|
||||
Release: 3%{?dist}
|
||||
Release: 4%{?dist}
|
||||
License: BSD
|
||||
Group: Applications/Internet
|
||||
URL: http://www.kernel.org/pub/software/network/tftp/
|
||||
@ -77,13 +79,26 @@ install -p -m 644 %SOURCE1 ${RPM_BUILD_ROOT}%{_unitdir}
|
||||
install -p -m 644 %SOURCE2 ${RPM_BUILD_ROOT}%{_unitdir}
|
||||
|
||||
%post server
|
||||
/sbin/service xinetd reload > /dev/null 2>&1 || :
|
||||
if [ $1 -eq 1 ] ; then
|
||||
# Initial installation
|
||||
%{systemctl_bin} daemon-reload >/dev/null 2>&1 || :
|
||||
fi
|
||||
|
||||
%preun server
|
||||
if [ $1 -eq 0 ] ; then
|
||||
# Package removal, not upgrade
|
||||
%{systemctl_bin} --no-reload disable tftp.service > /dev/null 2>&1 || :
|
||||
%{systemctl_bin} stop tftp.service > /dev/null 2>&1 || :
|
||||
fi
|
||||
|
||||
%postun server
|
||||
if [ $1 = 0 ]; then
|
||||
/sbin/service xinetd reload > /dev/null 2>&1 || :
|
||||
/bin/systemctl daemon-reload >/dev/null 2>&1 || :
|
||||
if [ $1 -ge 1 ] ; then
|
||||
# Package upgrade, not uninstall
|
||||
%{systemctl_bin} try-restart tftp.service >/dev/null 2>&1 || :
|
||||
fi
|
||||
|
||||
|
||||
%clean
|
||||
rm -rf ${RPM_BUILD_ROOT}
|
||||
|
||||
@ -103,6 +118,9 @@ rm -rf ${RPM_BUILD_ROOT}
|
||||
%{_unitdir}/*
|
||||
|
||||
%changelog
|
||||
* Wed May 30 2012 Jan Synáček <jsynacek@redhat.com> - 5.2-4
|
||||
- use systemd instead of xinetd as a default
|
||||
|
||||
* Tue May 22 2012 Jan Synáček <jsynacek@redhat.com> - 5.2-3
|
||||
- provide native systemd service files
|
||||
- Resolves: #737212
|
||||
|
||||
Loading…
Reference in New Issue
Block a user