drop old systemd scriptlets
This commit is contained in:
parent
ec49018d24
commit
0b8498da13
@ -46,34 +46,13 @@ echo 'OPTIONS="-w -i eth0"' > $RPM_BUILD_ROOT%{_sysconfdir}/sysconfig/phc2sys
|
||||
echo '.so man8/ptp4l.8' > $RPM_BUILD_ROOT%{_mandir}/man5/ptp4l.conf.5
|
||||
|
||||
%post
|
||||
%if 0%{?systemd_post:1}
|
||||
%systemd_post ptp4l.service phc2sys.service
|
||||
%else
|
||||
/bin/systemctl daemon-reload &> /dev/null || :
|
||||
%endif
|
||||
|
||||
%preun
|
||||
%if 0%{?systemd_preun:1}
|
||||
%systemd_preun phc2sys.service ptp4l.service
|
||||
%else
|
||||
if [ "$1" -eq 0 ]; then
|
||||
/bin/systemctl --no-reload disable \
|
||||
phc2sys.service ptp4l.service &> /dev/null
|
||||
/bin/systemctl stop phc2sys.service ptp4l.service &> /dev/null
|
||||
fi
|
||||
:
|
||||
%endif
|
||||
|
||||
%postun
|
||||
%if 0%{?systemd_postun_with_restart:1}
|
||||
%systemd_postun_with_restart ptp4l.service phc2sys.service
|
||||
%else
|
||||
/bin/systemctl daemon-reload &> /dev/null
|
||||
if [ "$1" -ge 1 ]; then
|
||||
/bin/systemctl try-restart ptp4l.service phc2sys.service &> /dev/null
|
||||
fi
|
||||
:
|
||||
%endif
|
||||
|
||||
%files
|
||||
%doc COPYING README.org default.cfg gPTP.cfg
|
||||
|
Loading…
Reference in New Issue
Block a user