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
parent
a019b9531f
commit
2064166d84
5
init
5
init
|
@ -64,7 +64,10 @@ if [ -z "$root" ]; then
|
||||||
echo "Warning: no root specified"
|
echo "Warning: no root specified"
|
||||||
root="/dev/sda1"
|
root="/dev/sda1"
|
||||||
elif [ "${root#LABEL=}" != $root ]; then
|
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
|
elif [ "${root#UUID=}" != $root ]; then
|
||||||
root="/dev/disk/by-uuid/${root#UUID=}"
|
root="/dev/disk/by-uuid/${root#UUID=}"
|
||||||
fi
|
fi
|
||||||
|
|
Loading…
Reference in New Issue