diff options
author | Dave Reisner <d@falconindy.com> | 2011-06-04 18:42:03 +0200 |
---|---|---|
committer | Dave Reisner <d@falconindy.com> | 2011-06-07 20:38:43 +0200 |
commit | acf51fb86ff05643f642aaf9588eff8dd3ba88fe (patch) | |
tree | d08ea7f8141ccc1edebb04cf5d416e252dadd1ce | |
parent | c6c455b941ce7fc12d099cb0ea79ec157ead38e0 (diff) | |
download | mkinitcpio-acf51fb86ff05643f642aaf9588eff8dd3ba88fe.tar.gz mkinitcpio-acf51fb86ff05643f642aaf9588eff8dd3ba88fe.tar.xz |
init_functions: support {LABEL,UUID}= syntax
use blkid to resolve a tag name to a block device.
Signed-off-by: Dave Reisner <d@falconindy.com>
-rw-r--r-- | init_functions | 9 |
1 files changed, 9 insertions, 0 deletions
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="" |