From: Jeremy Katz Date: Wed, 22 Jul 2009 20:08:49 +0000 (-0400) Subject: Support old syntax X-Git-Tag: 0.8~13 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=fa9d7304bfbe8686cddd7c3255a4da0aac9da76b;p=thirdparty%2Fdracut.git Support old syntax 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 --- diff --git a/modules.d/90dmsquash-live/parse-dmsquash-live.sh b/modules.d/90dmsquash-live/parse-dmsquash-live.sh index 55de0a2f7..019ca3f2a 100755 --- a/modules.d/90dmsquash-live/parse-dmsquash-live.sh +++ b/modules.d/90dmsquash-live/parse-dmsquash-live.sh @@ -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=}"