Modernize systemd scriptlets
This commit is contained in:
parent
a786322170
commit
0486870ef7
20
radvd.spec
20
radvd.spec
@ -1,7 +1,7 @@
|
|||||||
Summary: A Router Advertisement daemon
|
Summary: A Router Advertisement daemon
|
||||||
Name: radvd
|
Name: radvd
|
||||||
Version: 1.9.1
|
Version: 1.9.1
|
||||||
Release: 3%{?dist}
|
Release: 4%{?dist}
|
||||||
# The code includes the advertising clause, so it's GPL-incompatible
|
# The code includes the advertising clause, so it's GPL-incompatible
|
||||||
License: BSD with advertising
|
License: BSD with advertising
|
||||||
Group: System Environment/Daemons
|
Group: System Environment/Daemons
|
||||||
@ -64,22 +64,13 @@ install -p -m 644 %{SOURCE1} $RPM_BUILD_ROOT%{_sysconfdir}/tmpfiles.d/radvd.conf
|
|||||||
install -m 644 %{SOURCE2} ${RPM_BUILD_ROOT}%{_unitdir}
|
install -m 644 %{SOURCE2} ${RPM_BUILD_ROOT}%{_unitdir}
|
||||||
|
|
||||||
%postun
|
%postun
|
||||||
/bin/systemctl daemon-reload >/dev/null 2>&1 || :
|
%systemd_postun_with_restart radvd.service
|
||||||
|
|
||||||
if [ "$1" -ge 1 ]; then
|
|
||||||
/bin/systemctl try-restart radvd.service >/dev/null 2>&1 || :
|
|
||||||
fi
|
|
||||||
|
|
||||||
%post
|
%post
|
||||||
if [ "$1" -eq 1 ]; then
|
%systemd_post radvd.service
|
||||||
/bin/systemctl daemon-reload >/dev/null 2>&1 || :
|
|
||||||
fi
|
|
||||||
|
|
||||||
%preun
|
%preun
|
||||||
if [ "$1" -eq 0 ]; then
|
%systemd_preun radvd.service
|
||||||
/bin/systemctl --no-reload disable radvd.service > /dev/null 2>&1 || :
|
|
||||||
/bin/systemctl stop radvd.service > /dev/null 2>&1 || :
|
|
||||||
fi
|
|
||||||
|
|
||||||
%pre
|
%pre
|
||||||
getent group radvd >/dev/null || groupadd -r radvd
|
getent group radvd >/dev/null || groupadd -r radvd
|
||||||
@ -100,6 +91,9 @@ exit 0
|
|||||||
%{_sbindir}/radvdump
|
%{_sbindir}/radvdump
|
||||||
|
|
||||||
%changelog
|
%changelog
|
||||||
|
* Wed Aug 22 2012 Petr Pisar <ppisar@redhat.com> - 1.9.1-4
|
||||||
|
- Modernize systemd scriptlets (bug #850292)
|
||||||
|
|
||||||
* Tue Aug 07 2012 Petr Pisar <ppisar@redhat.com> - 1.9.1-3
|
* Tue Aug 07 2012 Petr Pisar <ppisar@redhat.com> - 1.9.1-3
|
||||||
- Remove useless chkconfig invocation (bug #845562)
|
- Remove useless chkconfig invocation (bug #845562)
|
||||||
- Do not reload unit file while unistalling
|
- Do not reload unit file while unistalling
|
||||||
|
Loading…
Reference in New Issue
Block a user