From acf51fb86ff05643f642aaf9588eff8dd3ba88fe Mon Sep 17 00:00:00 2001 From: Dave Reisner Date: Sat, 4 Jun 2011 12:42:03 -0400 Subject: init_functions: support {LABEL,UUID}= syntax use blkid to resolve a tag name to a block device. Signed-off-by: Dave Reisner --- init_functions | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/init_functions b/init_functions index be3599e..d9ffe4a 100644 --- a/init_functions +++ b/init_functions @@ -73,6 +73,15 @@ parse_cmdline() { } default_mount_handler() { + # resolve tag name to block device + if [ "${root:0:5}" = 'UUID=' ] || [ "${root:0:6}" = 'LABEL=' ]; then + device=$(blkid -t "$root" -o device) + if [ -n "$device" ]; then + root=$device + fi + unset device + fi + if [ ${root:0:5} != "/dev/" ] || ! poll_device "${root}" ${rootdelay}; then msg "Root device '${root}' doesn't exist. Attempting to create it." major="" -- cgit v1.2.3-24-g4f1b