From c59f8e5204e8de026907b23eb5676f6283738a3e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Petr=20=C5=A0abata?= Date: Tue, 28 Aug 2012 13:28:28 +0200 Subject: [PATCH] Migrate to systemd scriptlets --- lldpad.spec | 18 +++++++----------- 1 file changed, 7 insertions(+), 11 deletions(-) diff --git a/lldpad.spec b/lldpad.spec index a3a4d52..ae15f78 100644 --- a/lldpad.spec +++ b/lldpad.spec @@ -3,7 +3,7 @@ Name: lldpad Version: 0.9.45 -Release: 2%{?dist} +Release: 3%{?dist} Summary: Intel LLDP Agent Group: System Environment/Daemons License: GPLv2 @@ -63,21 +63,14 @@ rm -f %{buildroot}%{_libdir}/liblldp_clif.la %post /sbin/ldconfig -if [ $1 -eq 1 ]; then - systemctl daemon-reload >/dev/null 2>&1 || : -fi +%systemd_post %{name}.service %preun -if [ $1 -eq 0 ]; then - systemctl --no-reload disable %{name}.service >/dev/null 2>&1 || : - systemctl stop %{name}.service >/dev/null 2>&1 || : -fi +%systemd_preun %{name}.service %postun /sbin/ldconfig -if [ $1 -eq 1 ]; then - systemctl try-restart %{name}.service >/dev/null 2>&1 || : -fi +%systemd_postun_with_restart %{name}.service %post devel ## provide legacy support for apps that use the old dcbd interface. @@ -112,6 +105,9 @@ fi %{_libdir}/liblldp_clif.so %changelog +* Tue Aug 28 2012 Petr Šabata - 0.9.45-3 +- Migrate to systemd scriptlets (#850192) + * Thu Aug 23 2012 Petr Šabata - 0.9.45-2 - Fix displaying of the Management Address TLV (327ef662)