All of lore.kernel.org
 help / color / mirror / Atom feed
* multipath-tools/multipathd multipathd.init.redhat
@ 2007-04-30 18:06 bmarzins
  0 siblings, 0 replies; 6+ messages in thread
From: bmarzins @ 2007-04-30 18:06 UTC (permalink / raw)
  To: dm-cvs, dm-devel

CVSROOT:	/cvs/dm
Module name:	multipath-tools
Changes by:	bmarzins@sourceware.org	2007-04-30 19:06:21

Modified files:
	multipathd     : multipathd.init.redhat 

Log message:
	No multipathd description was being shown in system-config-services because of
	a blank line in /etc/init/mutlipath.d. Removed blank line.

Patches:
http://sourceware.org/cgi-bin/cvsweb.cgi/multipath-tools/multipathd/multipathd.init.redhat.diff?cvsroot=dm&r1=1.2&r2=1.3

--- multipath-tools/multipathd/multipathd.init.redhat	2005/06/13 17:39:12	1.2
+++ multipath-tools/multipathd/multipathd.init.redhat	2007/04/30 18:06:20	1.3
@@ -1,5 +1,4 @@
 #!/bin/bash
-
 #
 #	/etc/rc.d/init.d/multipathd
 #

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

* multipath-tools/multipathd multipathd.init.redhat
@ 2007-04-30 18:06 bmarzins
  0 siblings, 0 replies; 6+ messages in thread
From: bmarzins @ 2007-04-30 18:06 UTC (permalink / raw)
  To: dm-cvs, dm-devel

CVSROOT:	/cvs/dm
Module name:	multipath-tools
Branch: 	RHEL5_FC6
Changes by:	bmarzins@sourceware.org	2007-04-30 19:06:52

Modified files:
	multipathd     : multipathd.init.redhat 

Log message:
	No multipathd description was being shown in system-config-services because of
	a blank line in /etc/init/mutlipath.d. Removed blank line.

Patches:
http://sourceware.org/cgi-bin/cvsweb.cgi/multipath-tools/multipathd/multipathd.init.redhat.diff?cvsroot=dm&only_with_tag=RHEL5_FC6&r1=1.2&r2=1.2.4.1

--- multipath-tools/multipathd/multipathd.init.redhat	2005/06/13 17:39:12	1.2
+++ multipath-tools/multipathd/multipathd.init.redhat	2007/04/30 18:06:52	1.2.4.1
@@ -1,5 +1,4 @@
 #!/bin/bash
-
 #
 #	/etc/rc.d/init.d/multipathd
 #

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

* multipath-tools/multipathd multipathd.init.redhat
@ 2007-04-30 18:07 bmarzins
  0 siblings, 0 replies; 6+ messages in thread
From: bmarzins @ 2007-04-30 18:07 UTC (permalink / raw)
  To: dm-cvs, dm-devel

CVSROOT:	/cvs/dm
Module name:	multipath-tools
Branch: 	RHEL4_FC5
Changes by:	bmarzins@sourceware.org	2007-04-30 19:07:26

Modified files:
	multipathd     : multipathd.init.redhat 

Log message:
	No multipathd description was being shown in system-config-services because of
	a blank line in /etc/init/mutlipath.d. Removed blank line.

Patches:
http://sourceware.org/cgi-bin/cvsweb.cgi/multipath-tools/multipathd/multipathd.init.redhat.diff?cvsroot=dm&only_with_tag=RHEL4_FC5&r1=1.2&r2=1.2.2.1

--- multipath-tools/multipathd/multipathd.init.redhat	2005/06/13 17:39:12	1.2
+++ multipath-tools/multipathd/multipathd.init.redhat	2007/04/30 18:07:26	1.2.2.1
@@ -1,5 +1,4 @@
 #!/bin/bash
-
 #
 #	/etc/rc.d/init.d/multipathd
 #

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

* multipath-tools/multipathd multipathd.init.redhat
@ 2007-07-23 22:15 bmarzins
  0 siblings, 0 replies; 6+ messages in thread
From: bmarzins @ 2007-07-23 22:15 UTC (permalink / raw)
  To: dm-cvs, dm-devel

CVSROOT:	/cvs/dm
Module name:	multipath-tools
Branch: 	RHEL4_FC5
Changes by:	bmarzins@sourceware.org	2007-07-23 22:15:11

Modified files:
	multipathd     : multipathd.init.redhat 

Log message:
	Fix for bz #242724. init script now meets guidelines, and cannot exit early
	on status cmd.

Patches:
http://sourceware.org/cgi-bin/cvsweb.cgi/multipath-tools/multipathd/multipathd.init.redhat.diff?cvsroot=dm&only_with_tag=RHEL4_FC5&r1=1.2.2.1&r2=1.2.2.2

--- multipath-tools/multipathd/multipathd.init.redhat	2007/04/30 18:07:26	1.2.2.1
+++ multipath-tools/multipathd/multipathd.init.redhat	2007/07/23 22:15:11	1.2.2.2
@@ -22,7 +22,6 @@
 	. $initdir/functions
 fi
  
-test -x $DAEMON || exit 0
 test -r $sysconfig/$prog && . $sysconfig/$prog
 
 RETVAL=0
@@ -32,6 +31,7 @@
 #
 
 start() {
+	test -x $DAEMON || exit 5
 	echo -n $"Starting $prog daemon: "
 	daemon $DAEMON
 	RETVAL=$?
@@ -84,7 +84,7 @@
 	;;
 *)
 	echo $"Usage: $0 {start|stop|status|restart|condrestart|reload}"
-	RETVAL=1
+	RETVAL=3
 esac
 
 exit $RETVAL

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

* multipath-tools/multipathd multipathd.init.redhat
@ 2008-08-28 19:22 bmarzins
  0 siblings, 0 replies; 6+ messages in thread
From: bmarzins @ 2008-08-28 19:22 UTC (permalink / raw)
  To: dm-cvs, dm-devel

CVSROOT:	/cvs/dm
Module name:	multipath-tools
Branch: 	RHEL5_FC6
Changes by:	bmarzins@sourceware.org	2008-08-28 19:22:33

Modified files:
	multipathd     : multipathd.init.redhat 

Log message:
	Fix for bz #456228. Patch applied from bugzilla. The multipath init script now
	refuses to stop multipathd when the root device is a multipath device.  This
	was causing problems with shutdown on iSCSI devices.

Patches:
http://sourceware.org/cgi-bin/cvsweb.cgi/multipath-tools/multipathd/multipathd.init.redhat.diff?cvsroot=dm&only_with_tag=RHEL5_FC6&r1=1.2.4.2&r2=1.2.4.3

--- multipath-tools/multipathd/multipathd.init.redhat	2007/06/18 21:12:54	1.2.4.2
+++ multipath-tools/multipathd/multipathd.init.redhat	2008/08/28 19:22:33	1.2.4.3
@@ -4,7 +4,7 @@
 #
 # Starts the multipath daemon
 #
-# chkconfig: - 13 87
+# chkconfig: - 06 87
 # description: Manage device-mapper multipath devices
 # processname: multipathd
 
@@ -13,6 +13,7 @@
 initdir=/etc/rc.d/init.d
 lockdir=/var/lock/subsys
 sysconfig=/etc/sysconfig
+syspath=/sys/block
 
  
 system=redhat
@@ -26,6 +27,35 @@
 
 RETVAL=0
 
+teardown_slaves()
+{
+cd $1; 
+if [ -d "slaves" ]; then
+for slave in slaves/*;
+do
+	if [ "$slave" = "slaves/*" ]; then
+		read dev <  $1/dev
+		tablename=`dmsetup table --target multipath | sed -n "s/\(.*\): .* $dev .*/\1/p"`
+		if ! [ -z $tablename ]; then
+			echo "Root is on a multipathed device, multipathd can not be stopped"
+			exit 1
+		fi
+	else
+		local_slave=`readlink -f $slave`;
+		teardown_slaves $local_slave;
+	fi
+	done
+		
+else
+		read dev <  $1/dev
+		tablename=`dmsetup table --target multipath | sed -n "s/\(.*\): .* $dev .*/\1/p"`
+		if ! [ -z $tablename ]; then
+			echo "Root is on a multipathed device, multipathd can not be stopped"
+			exit 1
+		fi
+fi
+}
+
 #
 # See how we were called.
 #
@@ -40,6 +70,11 @@
 }
 
 stop() {
+        root_dev=$(awk '{ if ($1 !~ /^[ \t]*#/ && $2 == "/") { print $1; }}' /etc/mtab)
+	dm_num=`dmsetup info -c --noheadings -o minor $root_dev`
+	root_dm_device="dm-$dm_num"
+	[ -d $syspath/$root_dm_device ] && teardown_slaves $syspath/$root_dm_device
+
 	echo -n $"Stopping $prog daemon: "
 	killproc $DAEMON
 	RETVAL=$?

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

* multipath-tools/multipathd multipathd.init.redhat
@ 2009-08-31 21:58 bmarzins
  0 siblings, 0 replies; 6+ messages in thread
From: bmarzins @ 2009-08-31 21:58 UTC (permalink / raw)
  To: dm-cvs, dm-devel

CVSROOT:	/cvs/dm
Module name:	multipath-tools
Branch: 	RHEL5_FC6
Changes by:	bmarzins@sourceware.org	2009-08-31 21:58:52

Modified files:
	multipathd     : multipathd.init.redhat 

Log message:
	Fix for bz#502128.  multipathd.init only checks if the root device is multipathed, if the
	root device is a device-mapper device.

Patches:
http://sourceware.org/cgi-bin/cvsweb.cgi/multipath-tools/multipathd/multipathd.init.redhat.diff?cvsroot=dm&only_with_tag=RHEL5_FC6&r1=1.2.4.5&r2=1.2.4.6

--- multipath-tools/multipathd/multipathd.init.redhat	2009/05/15 21:01:27	1.2.4.5
+++ multipath-tools/multipathd/multipathd.init.redhat	2009/08/31 21:58:52	1.2.4.6
@@ -72,9 +72,11 @@
 
 stop() {
         root_dev=$(awk '{ if ($1 !~ /^[ \t]*#/ && $2 == "/") { print $1; }}' /etc/mtab)
-	dm_num=`dmsetup info -c --noheadings -o minor $root_dev`
-	root_dm_device="dm-$dm_num"
-	[ -d $syspath/$root_dm_device ] && teardown_slaves $syspath/$root_dm_device
+	dm_num=`dmsetup info -c --noheadings -o minor $root_dev 2> /dev/null`
+	if [ $? -eq 0 ]; then
+		root_dm_device="dm-$dm_num"
+		[ -d $syspath/$root_dm_device ] && teardown_slaves $syspath/$root_dm_device
+	fi
 
 	echo -n $"Stopping $prog daemon: "
 	killproc $DAEMON

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

end of thread, other threads:[~2009-08-31 21:58 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2009-08-31 21:58 multipath-tools/multipathd multipathd.init.redhat bmarzins
  -- strict thread matches above, loose matches on Subject: below --
2008-08-28 19:22 bmarzins
2007-07-23 22:15 bmarzins
2007-04-30 18:07 bmarzins
2007-04-30 18:06 bmarzins
2007-04-30 18:06 bmarzins

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.