packages: sanlock/sanlock-init-pld.patch, sanlock/sanlock.spec - updated to...

qboosh qboosh at pld-linux.org
Sun Jun 3 11:06:12 CEST 2012


Author: qboosh                       Date: Sun Jun  3 09:06:12 2012 GMT
Module: packages                      Tag: HEAD
---- Log message:
- updated to 2.3
- updated init-pld patch

---- Files affected:
packages/sanlock:
   sanlock-init-pld.patch (1.1 -> 1.2) , sanlock.spec (1.6 -> 1.7) 

---- Diffs:

================================================================
Index: packages/sanlock/sanlock-init-pld.patch
diff -u packages/sanlock/sanlock-init-pld.patch:1.1 packages/sanlock/sanlock-init-pld.patch:1.2
--- packages/sanlock/sanlock-init-pld.patch:1.1	Wed Mar  7 19:04:57 2012
+++ packages/sanlock/sanlock-init-pld.patch	Sun Jun  3 11:06:06 2012
@@ -1,13 +1,13 @@
---- sanlock-2.0/init.d/sanlock.orig	2012-03-02 22:13:24.000000000 +0100
-+++ sanlock-2.0/init.d/sanlock	2012-03-07 18:27:31.785530424 +0100
-@@ -31,27 +31,24 @@
+--- sanlock-2.3/init.d/sanlock.orig	2012-05-30 16:05:18.000000000 +0200
++++ sanlock-2.3/init.d/sanlock	2012-06-03 10:45:15.044632280 +0200
+@@ -31,93 +31,76 @@
  [ -f /etc/sysconfig/$prog ] && . /etc/sysconfig/$prog
  
  start() {
 -	[ -x $exec ] || exit 5
 -
 -	if [ ! -d /var/run/$prog ]; then
--		install -d -o $SANLOCKUSER -g $SANLOCKUSER -m 775 /var/run/$prog
+-		install -d -m 775 /var/run/$prog
 -		[ -x /sbin/restorecon ] && restorecon /var/run/$prog
 +	# Check if the service is already running?
 +	if [ -f /var/lock/subsys/sanlock ]; then
@@ -16,33 +16,51 @@
  	fi
 -
 -	echo -n $"Starting $prog: "
-+	msg_starting "sanlock"
- 	daemon --user=$SANLOCKUSER $prog daemon $SANLOCKOPTS
+-	daemon $prog daemon $SANLOCKOPTS
 -	retval=$?
 -	echo
--	[ $retval -eq 0 ]
+-
 -	return $retval
++	msg_starting "sanlock"
++	daemon --user=$SANLOCKUSER $prog daemon $SANLOCKOPTS
 +	RETVAL=$?
 +	[ $RETVAL -eq 0 ] && touch /var/lock/subsys/sanlock
++	return $RETVAL
  }
  
  stop() {
--	echo -n $"Stopping $prog: "
+-	echo -n $"Sending stop signal $prog: "
 -	killproc -p $lockfile $prog -TERM
 -	retval=$?
 -	echo
--	[ $retval -eq 0 ]
+-
+-	if [ $retval -ne 0 ]; then
+-		return $retval
 +	if [ ! -f /var/lock/subsys/sanlock ]; then
 +		msg_not_running "sanlock"
 +		return
-+	fi
-+	killproc --pidfile $lockfile $prog
-+	rm -f /var/lock/subsys/sanlock
- }
+ 	fi
++	killproc -p $lockfile $prog
  
- wait_for_stop() {
-@@ -60,53 +57,45 @@
+-	echo -n $"Waiting for $prog to stop:"
++	show "Waiting for %s to stop" "$prog"
++	busy
+ 	timeout=10
+ 	while [ -e $lockfile ]; do
+ 		sleep 1
+ 		timeout=$((timeout - 1))
+ 		if [ "$timeout" -le 0 ]; then
+-			failure; echo
++			fail
+ 			return 1
+ 		fi
  	done
+-
+-	success; echo
+-	return $retval
++	ok
++	rm -f /var/lock/subsys/sanlock
++	return 0
  }
  
 -restart() {
@@ -52,15 +70,15 @@
 +		RETVAL=$1
 +		return
 +	fi
- 	stop
- 	wait_for_stop
- 	start
- }
- 
--reload() {
--	restart
+ 	stop && start
+-	retval=$?
+-	return $retval
 -}
 -
+-reload() {
+-	restart
+ }
+ 
 -rh_status() {
 -	status $prog
 -}
@@ -68,9 +86,7 @@
 -rh_status_q() {
 -	rh_status >/dev/null 2>&1
 +restart() {
-+	stop
-+	wait_for_stop
-+	start
++	stop && start
  }
  
  case "$1" in

================================================================
Index: packages/sanlock/sanlock.spec
diff -u packages/sanlock/sanlock.spec:1.6 packages/sanlock/sanlock.spec:1.7
--- packages/sanlock/sanlock.spec:1.6	Thu May 10 21:13:05 2012
+++ packages/sanlock/sanlock.spec	Sun Jun  3 11:06:06 2012
@@ -3,12 +3,12 @@
 Summary:	Shared storage lock manager
 Summary(pl.UTF-8):	Zarządca blokad dla współdzielonego składowania danych
 Name:		sanlock
-Version:	2.2
+Version:	2.3
 Release:	1
 License:	LGPL v2+ (libsanlock_client, libwdmd), GPL v2 (libsanlock, utilities)
 Group:		Networking
 Source0:	https://fedorahosted.org/releases/s/a/sanlock/%{name}-%{version}.tar.gz
-# Source0-md5:	00e1fb3131a66bdb7ed7418de5abc9c8
+# Source0-md5:	17ddc7c7b9dfab30e82890b6d14cda57
 Patch0:		%{name}-link.patch
 Patch1:		%{name}-init-pld.patch
 URL:		https://fedorahosted.org/sanlock/
@@ -114,7 +114,7 @@
 
 install -d $RPM_BUILD_ROOT/usr/lib/tmpfiles.d
 cat >$RPM_BUILD_ROOT/usr/lib/tmpfiles.d/sanlock.conf <<EOF
-d /var/run/sanlock 0775 sanlock sanlock -
+d /var/run/sanlock 0775 root root -
 d /var/run/wdmd 0755 root root -
 EOF
 
@@ -189,6 +189,10 @@
 All persons listed below can be reached at <cvs_login>@pld-linux.org
 
 $Log$
+Revision 1.7  2012/06/03 09:06:06  qboosh
+- updated to 2.3
+- updated init-pld patch
+
 Revision 1.6  2012/05/10 19:13:05  qboosh
 - updated to 2.2
 
================================================================

---- CVS-web:
    http://cvs.pld-linux.org/packages/sanlock/sanlock-init-pld.patch?r1=1.1&r2=1.2
    http://cvs.pld-linux.org/packages/sanlock/sanlock.spec?r1=1.6&r2=1.7



More information about the pld-cvs-commit mailing list