rpms/avahi/devel avahi.spec,1.43,1.44

fedora-cvs-commits at redhat.com fedora-cvs-commits at redhat.com
Wed Mar 8 20:56:46 UTC 2006


Author: notting

Update of /cvs/dist/rpms/avahi/devel
In directory cvs.devel.redhat.com:/tmp/cvs-serv27643

Modified Files:
	avahi.spec 
Log Message:
Fix use of scriplets.

1. chkconfig --add is always unconditional.
2. condrestart goes in %postun, not %post (fixes script errors in the
installer)

http://fedoraproject.org/wiki/ScriptletSnippets for more information.



Index: avahi.spec
===================================================================
RCS file: /cvs/dist/rpms/avahi/devel/avahi.spec,v
retrieving revision 1.43
retrieving revision 1.44
diff -u -r1.43 -r1.44
--- avahi.spec	8 Mar 2006 01:09:51 -0000	1.43
+++ avahi.spec	8 Mar 2006 20:56:44 -0000	1.44
@@ -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 @@
 
 %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




More information about the fedora-cvs-commits mailing list