]> git.ipfire.org Git - thirdparty/dracut.git/commitdiff
Support old syntax
authorJeremy Katz <katzj@redhat.com>
Wed, 22 Jul 2009 20:08:49 +0000 (16:08 -0400)
committerHarald Hoyer <harald@redhat.com>
Tue, 4 Aug 2009 14:25:43 +0000 (16:25 +0200)
livecd-creator previously added 'liveimg' and used root=CDLABEL=;
it's easy enough to support that old syntax for now at least
and it will make it easier to get people testing

modules.d/90dmsquash-live/parse-dmsquash-live.sh

index 55de0a2f705f234cfe5ecba200d4dbf9cad53315..019ca3f2a9153500b27bb8f3ab9816d327351bbe 100755 (executable)
@@ -1,9 +1,13 @@
 # live images are specified with
 # root=live:backingdev
 
-echo "parsing for live"
 [ -z "$root" ] && root=$(getarg root=)
 
+# support legacy syntax of passing liveimg and then just the base root
+if getarg liveimg; then
+    liveroot="live:$root"
+fi
+
 if [ "${root%%:*}" = "live" ] ; then
     liveroot=$root
 fi
@@ -16,6 +20,11 @@ case "$liveroot" in
        root="$(echo $root | sed 's,/,\\x2f,g')"
        root="live:/dev/disk/by-label/${root#LABEL=}"
         rootok=1 ;;
+    live:CDLABEL=*|CDLABEL=*)
+       root="${root#live:}"
+       root="$(echo $root | sed 's,/,\\x2f,g')"
+       root="live:/dev/disk/by-label/${root#CDLABEL=}"
+        rootok=1 ;;
     live:UUID=*|UUID=*)
        root="${root#live:}"
        root="live:/dev/disk/by-uuid/${root#UUID=}"