[readonly/geninitrd/devel: 181/334] Test for LVM using lvdisplay (old way left for compatibility in some weird cases).

draenog draenog at pld-linux.org
Sat Nov 2 19:26:44 CET 2013


commit e59d9e5eaeb2e85a8eb0f10e024528e31e96dcb6
Author: Arkadiusz Miśkiewicz <arekm at maven.pl>
Date:   Thu Jan 29 12:34:25 2004 +0000

    Test for LVM using lvdisplay (old way left for compatibility in some weird cases).
    
    svn-id: @3225

 geninitrd | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
---
diff --git a/geninitrd b/geninitrd
index 6ee8c4a..4e862b6 100755
--- a/geninitrd
+++ b/geninitrd
@@ -577,7 +577,7 @@ find_modules_for() {
 		findmodule "-$loopFs"
 		BASICMODULES="$BASICMODULES -${loopFs}"
 		# don't have any clue, how is this supposed to work
-	elif ls -l "$1"|awk '{if (/^b/) { if ($5 == "58,") { exit 0; } else { exit 1; } } else { exit 1; }}'; then
+	elif ls -l "$1" | awk '{if (/^b/) { if ($5 == "58,") { exit 0; } else { exit 1; } } else { exit 1; }}' || /sbin/lvdisplay "$1" > /dev/null 2>&1 ; then
 		if [ ! -f /sbin/initrd-lvm -o ! -x /sbin/lvm ] ; then
 			echo "ERROR: root on LVM but /sbin/initrd-lvm and /sbin/lvm not found."
 			echo "Please install lvm(2) and lvm(2)-initrd package and rerun $0."
================================================================

---- gitweb:

http://git.pld-linux.org/gitweb.cgi/readonly/geninitrd.git/commitdiff/398807324938659207036e520c0950a61ef50c11



More information about the pld-cvs-commit mailing list