public inbox for lvm2-cvs@sourceware.org
help / color / mirror / Atom feed
* LVM2 ./WHATS_NEW scripts/lvm2_monitoring_init_ ...
@ 2010-04-15 19:15 agk
  0 siblings, 0 replies; 2+ messages in thread
From: agk @ 2010-04-15 19:15 UTC (permalink / raw)
  To: lvm-devel, lvm2-cvs

CVSROOT:	/cvs/lvm2
Module name:	LVM2
Changes by:	agk@sourceware.org	2010-04-15 19:15:04

Modified files:
	.              : WHATS_NEW 
	scripts        : lvm2_monitoring_init_red_hat.in 

Log message:
	Change daemon lock filename from lvm2_monitor to lvm2-monitor for consistency.

Patches:
http://sourceware.org/cgi-bin/cvsweb.cgi/LVM2/WHATS_NEW.diff?cvsroot=lvm2&r1=1.1528&r2=1.1529
http://sourceware.org/cgi-bin/cvsweb.cgi/LVM2/scripts/lvm2_monitoring_init_red_hat.in.diff?cvsroot=lvm2&r1=1.3&r2=1.4

--- LVM2/WHATS_NEW	2010/04/15 15:12:20	1.1528
+++ LVM2/WHATS_NEW	2010/04/15 19:15:03	1.1529
@@ -1,5 +1,6 @@
 Version 2.02.64 -
 =================================
+  Change daemon lock filename from lvm2_monitor to lvm2-monitor for consistency.
   Added awk script relpath.awk to calculate relative paths.
   Fix double DESTDIR usage for infodir and mandir.
   Install symbolic .so links with relative paths between usrlibdir and libdir.
--- LVM2/scripts/lvm2_monitoring_init_red_hat.in	2010/01/05 20:56:52	1.3
+++ LVM2/scripts/lvm2_monitoring_init_red_hat.in	2010/04/15 19:15:04	1.4
@@ -31,7 +31,7 @@
 
 . /etc/init.d/functions
 
-DAEMON=lvm2_monitor
+DAEMON=lvm2-monitor
 
 exec_prefix=@exec_prefix@
 sbindir=@sbindir@


^ permalink raw reply	[flat|nested] 2+ messages in thread

* LVM2 ./WHATS_NEW scripts/lvm2_monitoring_init_ ...
@ 2007-01-30 18:02 agk
  0 siblings, 0 replies; 2+ messages in thread
From: agk @ 2007-01-30 18:02 UTC (permalink / raw)
  To: lvm-devel, lvm2-cvs

CVSROOT:	/cvs/lvm2
Module name:	LVM2
Changes by:	agk@sourceware.org	2007-01-30 18:02:15

Modified files:
	.              : WHATS_NEW 
	scripts        : lvm2_monitoring_init_rhel4 

Log message:
	Add warning to lvm2_monitoring_init_rhel4 if attempting to stop monitoring.

Patches:
http://sourceware.org/cgi-bin/cvsweb.cgi/LVM2/WHATS_NEW.diff?cvsroot=lvm2&r1=1.565&r2=1.566
http://sourceware.org/cgi-bin/cvsweb.cgi/LVM2/scripts/lvm2_monitoring_init_rhel4.diff?cvsroot=lvm2&r1=1.1&r2=1.2

--- LVM2/WHATS_NEW	2007/01/29 23:01:17	1.565
+++ LVM2/WHATS_NEW	2007/01/30 18:02:15	1.566
@@ -1,5 +1,6 @@
 Version 2.02.21 -
 ===================================
+  Add warning to lvm2_monitoring_init_rhel4 if attempting to stop monitoring.
   Fix vgsplit to handle mirrors.
   Reorder fields in reporting field definitions.
   Fix vgs to treat args as VGs even when PV fields are displayed.
--- LVM2/scripts/lvm2_monitoring_init_rhel4	2007/01/24 23:43:27	1.1
+++ LVM2/scripts/lvm2_monitoring_init_rhel4	2007/01/30 18:02:15	1.2
@@ -25,11 +25,11 @@
 . /etc/init.d/functions
 
 VGCHANGE="/usr/sbin/vgchange"
+WARN=1
 
 start()
 {
-    for ret in 0
-    do
+	ret=0
 	# TODO do we want to separate out already active groups only?
 	VGS=`vgs --noheadings -o name`
 	for vg in $VGS
@@ -40,50 +40,58 @@
 	    fi
 	done
 
-    done
-
-    return $ret
+	return $ret
 }
 
 
 stop()
 {
-    for ret in 0
-    do
+	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."
+	   return 1
+	fi
 	VGS=`vgs --noheadings -o name`
 	for vg in $VGS
 	do
-	    if ! action "Starting monitoring for VG $vg:" $VGCHANGE --monitor n $vg
+	    if ! action "Stopping monitoring for VG $vg:" $VGCHANGE --monitor n $vg
 	    then
 		ret=$?
 	    fi
 	done
-
-    done
-
+	return $ret
 }
 
-ret=1
+result=1
 
 # See how we were called.
 case "$1" in
   start)
 	start
-	ret=$?
+	result=$?
+	;;
+
+  force-stop)
+	WARN=0
+	stop
+	result=$?
 	;;
 
   stop)
+	test "$runlevel" = "0" && WARN=0
+	test "$runlevel" = "6" && WARN=0
 	stop
-	ret=$?
+	result=$?
 	;;
 
   restart)
+	WARN=0
 	if stop
 	then
 		start
 	fi 
-	ret=$?
+	result=$?
 	;;
 
   status)
@@ -91,8 +99,8 @@
 	;;
 
   *)
-	echo $"Usage: $0 {start|stop|restart|status}"
+	echo $"Usage: $0 {start|stop|restart|status|force-stop}"
 	;;
 esac
 
-exit $ret
+exit $result


^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2010-04-15 19:15 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2010-04-15 19:15 LVM2 ./WHATS_NEW scripts/lvm2_monitoring_init_ agk
  -- strict thread matches above, loose matches on Subject: below --
2007-01-30 18:02 agk

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).