From 3c6090c127bfb5b8dffc5a27ef326e02c8bea07e Mon Sep 17 00:00:00 2001 From: Lennart Poettering Date: Feb 18 2011 13:11:29 +0000 Subject: rework systemd integration --- diff --git a/avahi.spec b/avahi.spec index 6f126d1..8522a6e 100644 --- a/avahi.spec +++ b/avahi.spec @@ -380,14 +380,13 @@ fi %triggerun -- avahi < 0.6.26-1 if /sbin/chkconfig avahi-daemon ; then - /bin/systemctl enable avahi-daemon.service >/dev/null 2>&1 || : + /bin/systemctl --no-reload enable avahi-daemon.service >/dev/null 2>&1 || : fi %preun if [ "$1" -eq 0 ]; then - /bin/systemctl disable avahi-daemon.service >/dev/null 2>&1 || : + /bin/systemctl --no-reload disable avahi-daemon.service >/dev/null 2>&1 || : /bin/systemctl stop avahi-daemon.service >/dev/null 2>&1 || : - /sbin/service avahi-daemon stop >/dev/null 2>&1 || : /sbin/chkconfig --del avahi-daemon >/dev/null 2>&1 || : fi @@ -412,24 +411,24 @@ getent passwd avahi-autoipd >/dev/null 2>&1 || useradd \ %post dnsconfd /sbin/chkconfig --add avahi-dnsconfd >/dev/null 2>&1 || : -/bin/systemctl daemon-reload >/dev/null 2>&1 || : +if [ "$1" -eq 1 ]; then + /bin/systemctl daemon-reload >/dev/null 2>&1 || : +fi + +%triggerun dnsconfd -- avahi-dnsconfd < 0.6.26-1 +if /sbin/chkconfig avahi-dnsconfd ; then + /bin/systemctl --no-reload enable avahi-dnsconfd.service >/dev/null 2>&1 || : +fi %preun dnsconfd if [ "$1" -eq 0 ]; then - /bin/systemctl disable avahi-dnsconfd.service >/dev/null 2>&1 || : - /sbin/service avahi-dnsconfd stop >/dev/null 2>&1 || : + /bin/systemctl --no-reload disable avahi-dnsconfd.service >/dev/null 2>&1 || : + /bin/systemctl stop avahi-dnsconfd.service >/dev/null 2>&1 || : /sbin/chkconfig --del avahi-dnsconfd >/dev/null 2>&1 || : fi %postun dnsconfd -if [ "$1" -ge "1" ]; then - /sbin/service avahi-dnsconfd condrestart >/dev/null 2>&1 || : -fi - -%triggerin dnsconfd -- avahi-dnsconfd < 0.6.26-1 -if /sbin/chkconfig avahi-dnsconfd ; then - /bin/systemctl enable avahi-dnsconfd.service >/dev/null 2>&1 || : -fi +/bin/systemctl daemon-reload >/dev/null 2>&1 || : %post glib -p /sbin/ldconfig %postun glib -p /sbin/ldconfig