From 2064166d84619f9191a8b348a15e6302c31d0b9a Mon Sep 17 00:00:00 2001 From: Bill Nottingham Date: Sat, 10 Jan 2009 14:59:11 -0500 Subject: [PATCH] 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. --- init | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/init b/init index d4ec826d..9b7cfe99 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