summaryrefslogtreecommitdiffstats
path: root/modules.d/95rootfs-block/parse-block.sh
diff options
context:
space:
mode:
Diffstat (limited to 'modules.d/95rootfs-block/parse-block.sh')
-rwxr-xr-xmodules.d/95rootfs-block/parse-block.sh15
1 files changed, 15 insertions, 0 deletions
diff --git a/modules.d/95rootfs-block/parse-block.sh b/modules.d/95rootfs-block/parse-block.sh
new file mode 100755
index 0000000..9c4357e
--- /dev/null
+++ b/modules.d/95rootfs-block/parse-block.sh
@@ -0,0 +1,15 @@
+#!/bin/sh
+
+case "${root#block:}" in
+ LABEL=* | UUID=* | PARTUUID=* | PARTLABEL=*)
+ root="block:$(label_uuid_to_dev "$root")"
+ rootok=1
+ ;;
+ /dev/*)
+ root="block:${root#block:}"
+ # shellcheck disable=SC2034
+ rootok=1
+ ;;
+esac
+
+[ "${root%%:*}" = "block" ] && wait_for_dev "${root#block:}"