Browse Source

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.
master
Bill Nottingham 16 years ago committed by Jeremy Katz
parent
commit
2064166d84
  1. 5
      init

5
init

@ -64,7 +64,10 @@ if [ -z "$root" ]; then @@ -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

Loading…
Cancel
Save