From: Bill Nottingham Date: Sat, 10 Jan 2009 19:59:11 +0000 (-0500) Subject: Fix 'root=LABEL=/' X-Git-Tag: 0.1~483 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=2064166d84619f9191a8b348a15e6302c31d0b9a;p=thirdparty%2Fdracut.git Fix 'root=LABEL=/' As you can't have /dev/disk/by-label//, we need to escape the '/' character in the same way that udev does. --- diff --git a/init b/init index d4ec826df..9b7cfe995 100755 --- a/init +++ b/init @@ -64,7 +64,10 @@ if [ -z "$root" ]; then echo "Warning: no root specified" root="/dev/sda1" elif [ "${root#LABEL=}" != $root ]; then - root="/dev/disk/by-label/${root#LABEL=}" + # FIXME: may need to do more escaping here + l=${root#LABEL=} + label=${l//\//\\x2f} + root="/dev/disk/by-label/${label}" elif [ "${root#UUID=}" != $root ]; then root="/dev/disk/by-uuid/${root#UUID=}" fi