[readonly/geninitrd/devel: 222/334] Test checking if rootfs is on LVM was broken for LVM1 case - fixed.
draenog
draenog at pld-linux.org
Sat Nov 2 19:30:11 CET 2013
commit 71888053f6d64cf4432f4a19d4f723ac6fde3e8b
Author: Arkadiusz Miśkiewicz <arekm at maven.pl>
Date: Sat Jun 26 23:19:56 2004 +0000
Test checking if rootfs is on LVM was broken for LVM1 case - fixed.
svn-id: @4250
geninitrd | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
---
diff --git a/geninitrd b/geninitrd
index f41a0c5..c5ebe3c 100755
--- a/geninitrd
+++ b/geninitrd
@@ -608,7 +608,7 @@ find_modules_for() {
findmodule "-$loopFs"
BASICMODULES="$BASICMODULES -${loopFs}"
# don't have any clue, how is this supposed to work
- elif ls -l "$1" 2> /dev/null | awk '{if (/^b/) { if ($5 == "58,") { exit 0; } else { exit 1; } } else { exit 1; }}' || /sbin/lvdisplay "$1" > /dev/null 2>&1 ; then
+ elif [ -e "$1" ] && ls -l "$1" 2> /dev/null | awk '{if (/^b/) { if ($5 == "58,") { exit 0; } else { exit 1; } } else { exit 1; }}' || /sbin/lvm lvdisplay "$1" > /dev/null 2>&1 ; then
if [ ! -f /sbin/initrd-lvm -o ! -x /sbin/lvdisplay -o ! -x /sbin/pvdisplay ] ; then
echo "ERROR: root on LVM but /sbin/initrd-lvm, /sbin/lvdisplay and /sbin/pvdisplay not found." >&2
echo "Please install lvm(2) and lvm(2)-initrd package and rerun $0." >&2
================================================================
---- gitweb:
http://git.pld-linux.org/gitweb.cgi/readonly/geninitrd.git/commitdiff/398807324938659207036e520c0950a61ef50c11
More information about the pld-cvs-commit
mailing list