diff --git a/avahi.spec b/avahi.spec index 8982491..fe7f3be 100644 --- a/avahi.spec +++ b/avahi.spec @@ -4,7 +4,7 @@ %endif Name: avahi Version: 0.6.9 -Release: 1 +Release: 2 Summary: Local network service discovery Group: System Environment/Base License: LGPL @@ -198,35 +198,22 @@ rm -rf $RPM_BUILD_ROOT %post /sbin/ldconfig +/sbin/chkconfig --add avahi-daemon >/dev/null 2>&1 +/sbin/chkconfig --add avahi-dnsconfd >/dev/null 2>&1 if [ "$1" -eq 1 ]; then - if ! /sbin/chkconfig --list avahi-daemon >/dev/null 2>&1 ; then - # if user has not configured avahi service at all - /sbin/chkconfig --add avahi-daemon >/dev/null 2>&1 - fi; - if ! /sbin/chkconfig --list avahi-dnsconfd >/dev/null 2>&1 ; then - # avahi-dnsconfd NOT run by default in any runlevel; add it - # so system-config-services can see it - /sbin/chkconfig --add avahi-dnsconfd >/dev/null 2>&1 - fi; # We should realy make dbus reload the system.d config here. Dunno how though. # kill -HUP `cat /var/run/messagebus.pid` ? if [ -s /etc/localtime ]; then cp -fp /etc/localtime /etc/avahi/etc/localtime || :; fi; -elif [ "$1" -gt 1 ]; then - if ! /sbin/chkconfig --list avahi-daemon >/dev/null 2>&1 ; then - # if user has not configured avahi service at all - # reset initscript run order: - LC_ALL=C /sbin/chkconfig --levels=0123456 avahi-daemon reset >/dev/null 2>&1 - fi; -# pre 0.5.2-3, avahi-daemon initscript had 'chkconfig: 345 34 66', -# so it got started AFTER messagebus ( 97 ) and was unable to start. -# It now has 'chkconfig: 345 98 02'. +fi + +%postun +/sbin/ldconfig +if [ "$1" -ge "1" ]; then /sbin/service avahi-daemon condrestart >/dev/null 2>&1 /sbin/service avahi-dnsconfd condrestart >/dev/null 2>&1 -fi; - -%postun -p /sbin/ldconfig +fi %preun if [ "$1" -eq 0 ]; then