Adding plainroot.
authorDaniel Baumann <daniel@debian.org>
Sun, 2 Mar 2008 11:22:30 +0000 (12:22 +0100)
committerDaniel Baumann <daniel@debian.org>
Wed, 9 Mar 2011 16:31:06 +0000 (17:31 +0100)
scripts/live

index ea770f4..0ed7675 100755 (executable)
@@ -386,6 +386,16 @@ Arguments ()
                                export EXPOSED_ROOT
                                ;;
 
+                       plainroot)
+                               PLAIN_ROOT="Yes"
+                               export PLAIN_ROOT
+                               ;;
+
+                       root=*)
+                               ROOT="${ARGUMENT#root=}"
+                               export ROOT
+                               ;;
+
                        union=*)
                                UNIONTYPE="${ARGUMENT#union=}"
                                export UNIONTYPE
@@ -1254,18 +1264,24 @@ mountroot ()
                        panic "Unable to find a live file system on the network"
                fi
        else
-               # Scan local devices for the image
-               for i in 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19
-               do
-                       livefs_root=$(find_livefs ${i})
+               if [ -n "${PLAIN_ROOT}" ] && [ -n "${ROOT}" ]
+               then
+                       # Do a local boot from hd
+                       livefs_root=${ROOT}
+               else
+                       # Scan local devices for the image
+                       for i in 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19
+                       do
+                               livefs_root=$(find_livefs ${i})
 
-                       if [ -n "${livefs_root}" ]
-                       then
-                               break
-                       fi
+                               if [ -n "${livefs_root}" ]
+                               then
+                                       break
+                               fi
 
-                       sleep 1
-               done
+                               sleep 1
+                       done
+               fi
        fi
 
        if [ -z "${livefs_root}" ]