rpms/avahi/devel avahi-0.6.3-lockfile.patch, NONE, 1.1 avahi.spec, 1.30, 1.31
fedora-cvs-commits at redhat.com
fedora-cvs-commits at redhat.com
Fri Jan 20 18:12:46 UTC 2006
- Previous message (by thread): rpms/kbd/devel kbd.spec,1.26,1.27 keytable.init,1.4,NONE
- Next message (by thread): rpms/totem/devel .cvsignore, 1.16, 1.17 sources, 1.16, 1.17 totem.spec, 1.46, 1.47
- Messages sorted by:
[ date ]
[ thread ]
[ subject ]
[ author ]
Author: pjones
Update of /cvs/dist/rpms/avahi/devel
In directory cvs.devel.redhat.com:/tmp/cvs-serv19895
Modified Files:
avahi.spec
Added Files:
avahi-0.6.3-lockfile.patch
Log Message:
- fix subsystem locking so this doesn't run on every runlevel change, etc.
avahi-0.6.3-lockfile.patch:
avahi-daemon.in | 20 ++++++++++++--------
avahi-dnsconfd.in | 17 +++++++++++++----
2 files changed, 25 insertions(+), 12 deletions(-)
--- NEW FILE avahi-0.6.3-lockfile.patch ---
--- avahi-0.6.3/initscript/fedora/avahi-dnsconfd.in.lockfile 2006-01-19 09:53:11.000000000 -0500
+++ avahi-0.6.3/initscript/fedora/avahi-dnsconfd.in 2006-01-19 09:59:20.000000000 -0500
@@ -23,11 +23,18 @@
AVAHI_BIN=@sbindir@/avahi-dnsconfd
test -x $AVAHI_BIN || exit 5
+LOCKFILE=/var/lock/subsys/avahi-daemon
+
start() {
echo -n $"Starting Avahi DNS daemon... "
$AVAHI_BIN -D
RETVAL=$?
- [ $RETVAL = 0 ] && success $"$base startup" || failure $"$base startup"
+ if [ $RETVAL = 0 ]; then
+ touch $LOCKFILE
+ success $"$base startup"
+ else
+ failure $"$base startup"
+ fi
echo
return $RETVAL
}
@@ -36,6 +43,8 @@
echo -n "Shutting down Avahi DNS daemon: "
$AVAHI_BIN -k
RETVAL=$?
+ [ $RETVAL = 0 ] && success $"$base shutdown" || failure $"$base shutdown"
+ rm -f $LOCKFILE
echo
return $RETVAL
}
@@ -76,9 +85,9 @@
reload
;;
condrestart)
- $AVAHI_BIN -c
- [ $? = 0 ] && restart || :
- ;;
+ if [ -f $LOCKFILE ]; then
+ restart
+ fi
*)
echo $"Usage: $0 {start|stop|status|restart|condrestart}"
exit 1
--- avahi-0.6.3/initscript/fedora/avahi-daemon.in.lockfile 2006-01-19 09:53:05.000000000 -0500
+++ avahi-0.6.3/initscript/fedora/avahi-daemon.in 2006-01-19 09:59:20.000000000 -0500
@@ -23,18 +23,20 @@
AVAHI_BIN=@sbindir@/avahi-daemon
test -x $AVAHI_BIN || exit 5
+LOCKFILE=/var/lock/subsys/avahi-daemon
+
base=${0##*/}
start() {
echo -n $"Starting Avahi daemon... "
- if [ -f /var/run/avahi-daemon/pid ] && avpid=`cat /var/run/avahi-daemon/pid` && [ -d /proc/$avpid ] && [ `readlink /proc/$avpid/exe` = '/usr/sbin/avahi-daemon' ]; then
- success;
- echo;
- return 0;
- fi;
$AVAHI_BIN -D
RETVAL=$?
- [ $RETVAL = 0 ] && success $"$base startup" || failure $"$base startup"
+ if [ $RETVAL = 0 ]; then
+ touch $LOCKFILE
+ success $"$base startup"
+ else
+ failure $"$base startup"
+ fi
echo
return $RETVAL
}
@@ -44,6 +46,7 @@
$AVAHI_BIN -k
RETVAL=$?
[ $RETVAL = 0 ] && success $"$base shutdown" || failure $"$base shutdown"
+ rm -f $LOCKFILE
echo
return $RETVAL
}
@@ -83,8 +86,9 @@
reload
;;
condrestart)
- $AVAHI_BIN -c
- [ $? = 0 ] && restart || :
+ if [ -f $LOCKFILE ]; then
+ restart
+ fi
;;
*)
echo $"Usage: $0 {start|stop|status|restart|condrestart}"
Index: avahi.spec
===================================================================
RCS file: /cvs/dist/rpms/avahi/devel/avahi.spec,v
retrieving revision 1.30
retrieving revision 1.31
diff -u -r1.30 -r1.31
--- avahi.spec 19 Jan 2006 21:51:13 -0000 1.30
+++ avahi.spec 20 Jan 2006 18:12:43 -0000 1.31
@@ -4,7 +4,7 @@
%endif
Name: avahi
Version: 0.6.4
-Release: 2
+Release: 3
Summary: Local network service discovery
Group: System Environment/Base
License: LGPL
@@ -25,6 +25,7 @@
# enable mono's mcs to work in beehive buildroot:
Patch6: avahi-0.6.3-MONO_SHARED_DIR.patch
Patch7: avahi-0.6.4-initscript-i18n.patch
+Patch8: avahi-0.6.3-lockfile.patch
%description
Avahi is a system which facilitates service discovery on
@@ -120,6 +121,7 @@
%patch6 -p1 -b .MONO_SHARED_DIR
%endif
%patch7 -p1 -b .i18n
+%patch8 -p1 -b .lockfile
%build
# auto* update needed for avahi-0.5.2-fedora.patch
@@ -285,6 +287,9 @@
%endif
%changelog
+* Fri Jan 20 2006 Peter Jones <pjones at redhat.com> - 0.6.4-3
+- fix subsystem locking in the initscript
+
* Thu Jan 19 2006 Jason Vas Dias <jvdias at redhat.com> - 0.6.4-2
- fix bug 178127: fully localize the initscript
- Previous message (by thread): rpms/kbd/devel kbd.spec,1.26,1.27 keytable.init,1.4,NONE
- Next message (by thread): rpms/totem/devel .cvsignore, 1.16, 1.17 sources, 1.16, 1.17 totem.spec, 1.46, 1.47
- Messages sorted by:
[ date ]
[ thread ]
[ subject ]
[ author ]
More information about the fedora-cvs-commits
mailing list