packages: lvm2/lvm2.spec, lvm2/pldize_lvm2_monitor.patch - sysv: lvm2monito...

glen glen at pld-linux.org
Wed Apr 18 17:15:36 CEST 2012


Author: glen                         Date: Wed Apr 18 15:15:36 2012 GMT
Module: packages                      Tag: HEAD
---- Log message:
- sysv: lvm2monitor: calling programs via daemon() is asking for trouble; use buzy/ok/fail instead; this way quoting won't get lost

---- Files affected:
packages/lvm2:
   lvm2.spec (1.195 -> 1.196) , pldize_lvm2_monitor.patch (1.4 -> 1.5) 

---- Diffs:

================================================================
Index: packages/lvm2/lvm2.spec
diff -u packages/lvm2/lvm2.spec:1.195 packages/lvm2/lvm2.spec:1.196
--- packages/lvm2/lvm2.spec:1.195	Wed Apr 18 13:56:01 2012
+++ packages/lvm2/lvm2.spec	Wed Apr 18 17:15:31 2012
@@ -44,7 +44,7 @@
 Summary(pl.UTF-8):	Nowa wersja Logical Volume Managera dla Linuksa
 Name:		lvm2
 Version:	2.02.95
-Release:	3
+Release:	4
 License:	GPL v2
 Group:		Applications/System
 Source0:	ftp://sources.redhat.com/pub/lvm2/LVM2.%{version}.tgz
@@ -510,6 +510,9 @@
 All persons listed below can be reached at <cvs_login>@pld-linux.org
 
 $Log$
+Revision 1.196  2012/04/18 15:15:31  glen
+- sysv: lvm2monitor: calling programs via daemon() is asking for trouble; use buzy/ok/fail instead; this way quoting won't get lost
+
 Revision 1.195  2012/04/18 11:56:01  glen
 - remove backslash which made all vgchange calls void (passed to msg_ argument which ignored them)
 

================================================================
Index: packages/lvm2/pldize_lvm2_monitor.patch
diff -u packages/lvm2/pldize_lvm2_monitor.patch:1.4 packages/lvm2/pldize_lvm2_monitor.patch:1.5
--- packages/lvm2/pldize_lvm2_monitor.patch:1.4	Wed Apr 18 13:56:01 2012
+++ packages/lvm2/pldize_lvm2_monitor.patch	Wed Apr 18 17:15:31 2012
@@ -1,27 +1,54 @@
---- LVM2.2.02.85/scripts/lvm2_monitoring_init_red_hat.in.orig	2011-10-05 21:33:09.165296447 +0200
-+++ LVM2.2.02.85/scripts/lvm2_monitoring_init_red_hat.in	2011-10-05 21:36:47.152774996 +0200
+--- LVM2.2.02.85/scripts/lvm2_monitoring_init_red_hat.in	2011-10-05 21:36:47.152774996 +0200
++++ LVM2.2.02.95/scripts/lvm2_monitoring_init_red_hat.in	2012-04-18 18:11:44.000000000 +0300
 @@ -1,3 +1,3 @@
 -#!/bin/bash
 +#!/bin/sh
  #
  # Copyright (C) 2007-2009 Red Hat, Inc. All rights reserved.
-@@ -50,7 +50,8 @@ start()
+@@ -46,12 +46,19 @@
+ 
+ start()
+ {
+-	ret=0
++	local ret=0
+ 	# TODO do we want to separate out already active groups only?
  	VGSLIST=`$VGS --noheadings -o name --config 'log{command_names=0 prefix="  "}' 2> /dev/null`
  	for vg in $VGSLIST
  	do
 -	    action "Starting monitoring for VG $vg:" $VGCHANGE --monitor y --poll y --config 'log{command_names=0 prefix="  "}' $vg || ret=$?
-+	    msg_starting "Starting monitoring for VG $vg:"
-+		daemon $VGCHANGE --monitor y --poll y --config 'log{command_names=0 prefix="  "}' $vg || return $?
++	    msg_starting "Starting monitoring for VG $vg:"; busy
++		$VGCHANGE --monitor y --poll y --config 'log{command_names=0 prefix="  "}' $vg
++	   	ret=$?
++		if [ $ret -ne 0 ]; then
++			fail
++			return $ret
++		fi
++		ok
  	done
  
  	return $ret
-@@ -68,7 +71,8 @@ stop()
+@@ -60,7 +67,7 @@
+ 
+ stop()
+ {
+-	ret=0
++	local ret=0
+ 	# TODO do we want to separate out already active groups only?
+ 	if test "$WARN" = "1"; then
+ 	   echo "Not stopping monitoring, this is a dangerous operation. Please use force-stop to override."
+@@ -69,7 +76,14 @@
  	VGSLIST=`$VGS --noheadings -o name --config 'log{command_names=0 prefix="  "}' 2> /dev/null`
  	for vg in $VGSLIST
  	do
 -	    action "Stopping monitoring for VG $vg:" $VGCHANGE --monitor n --config 'log{command_names=0 prefix="  "}' $vg || ret=$?
-+	    msg_stopping "Stopping monitoring for VG $vg:"
-+		daemon $VGCHANGE --monitor n --config 'log{command_names=0 prefix="  "}' $vg || return $?
++	    msg_stopping "Stopping monitoring for VG $vg:"; busy
++		$VGCHANGE --monitor n --config 'log{command_names=0 prefix="  "}' $vg
++	   	ret=$?
++		if [ $ret -ne 0 ]; then
++			fail
++			return $ret
++		fi
++		ok
  	done
  	return $ret
  }
================================================================

---- CVS-web:
    http://cvs.pld-linux.org/packages/lvm2/lvm2.spec?r1=1.195&r2=1.196
    http://cvs.pld-linux.org/packages/lvm2/pldize_lvm2_monitor.patch?r1=1.4&r2=1.5



More information about the pld-cvs-commit mailing list