[readonly/geninitrd: 528/1068] - can extract WWID directly from DM_UUID, no need to solve deps

draenog draenog at pld-linux.org
Sat Nov 2 19:56:47 CET 2013


commit b0d329a2bfd8733e169036eacf3cbbc768409bcc
Author: Elan Ruusamäe <glen at pld-linux.org>
Date:   Tue Nov 13 23:56:27 2007 +0000

    - can extract WWID directly from DM_UUID, no need to solve deps
    
    svn-id: @9049

 geninitrd | 17 +++++++----------
 1 file changed, 7 insertions(+), 10 deletions(-)
---
diff --git a/geninitrd b/geninitrd
index 03d3d66..471deff 100755
--- a/geninitrd
+++ b/geninitrd
@@ -729,18 +729,15 @@ find_modules_multipath() {
 	if [ -z "$DM_NAME" ]; then
 		die "dm_export failed unexpectedly"
 	fi
-	mpath_wwid=${DM_UUID##*-}
-
-	if [ "$DM_TARGET_TYPES" != multipath ]; then
-		local dep deps=$(dm_deps $DM_NAME)
-		# must be a partition, fetch deps and retry
-		for dep in $deps; do
-			find_modules_multipath $dep && return
-		done
-		die "Couldn't find underlying device from $DM_NAME"
-	fi
 
+	# Partition:
+	#  DM_NAME=LUN-28p1
+	#  DM_UUID=part1-mpath-36006016002c11800a0aa05fbfae0db11
+	# Disk:
+	#  DM_NAME=LUN-28
+	#  DM_UUID=mpath-36006016002c11800a0aa05fbfae0db11
 	MPATH_WWID=${DM_UUID##*-}
+
 	local info=$(multipath -l $MPATH_WWID)
 	if [ -z "$info" ]; then
 		return 1
================================================================

---- gitweb:

http://git.pld-linux.org/gitweb.cgi/readonly/geninitrd.git/commitdiff/147754ca159d40ca5eb541074dc043d8cbd92090



More information about the pld-cvs-commit mailing list