]> git.pld-linux.org Git - projects/geninitrd.git/commitdiff
Lilo always passes root=XYZ where XYZ is major/minor of the device. In lvm case this...
authorArkadiusz Miśkiewicz <arekm@maven.pl>
Tue, 15 Jul 2008 12:27:44 +0000 (12:27 +0000)
committerArkadiusz Miśkiewicz <arekm@maven.pl>
Tue, 15 Jul 2008 12:27:44 +0000 (12:27 +0000)
svn-id: @9843

geninitrd

index b68d548773e3413befcb53563c7b6533e1b65f27..6bedc118611571d6cfc4a8e4100ca2ab23ded6e7 100755 (executable)
--- a/geninitrd
+++ b/geninitrd
@@ -1498,16 +1498,20 @@ initrd_gen_lvm() {
                        export SUSPENDVG=$SUSPENDVG
                EOF
                add_linuxrc <<-'EOF'
-                       # parse rootdev from kernel commandline
-                       if [ "$ROOT" != "$ROOTDEV" ]; then
-                               ROOTDEV=$ROOT
-                               echo "LVM: Using 'root=$ROOTDEV' from kernel commandline"
-                               local tmp=${ROOTDEV#/dev/}
-                               if [ "$tmp" != "$ROOTDEV" ]; then
-                                       ROOTVG=${tmp%/*}
-                                       echo "LVM: Using Volume Group '$ROOTVG' for rootfs"
+                       # parse rootdev from kernel commandline if it begins with /
+                       case "$ROOT" in
+                               /*)
+                               if [ "$ROOT" != "$ROOTDEV" ]; then
+                                       ROOTDEV=$ROOT
+                                       echo "LVM: Using 'root=$ROOTDEV' from kernel commandline"
+                                       local tmp=${ROOTDEV#/dev/}
+                                       if [ "$tmp" != "$ROOTDEV" ]; then
+                                               ROOTVG=${tmp%/*}
+                                               echo "LVM: Using Volume Group '$ROOTVG' for rootfs"
+                                       fi
                                fi
-                       fi
+                               ;;
+                       esac
 
                        # skip duplicate VG
                        if [ "$SUSPENDVG" = "$ROOTVG" ]; then
This page took 0.092865 seconds and 4 git commands to generate.