busybox blkid does not support -s argument. Use POSIX shell
to filter out the tags needed from the output of the blkid
invocation.
Fixes https://github.com/dracut-ng/dracut-ng/issues/2207
for the dmsquash-live module.
# determine filesystem type for a filesystem image
det_img_fs() {
udevadm settle >&2
- blkid -s TYPE -u noraid -o value "$1"
+
+ # avoid blkid options to maintain compatibility with busybox
+ devicetype=$(blkid "$1")
+ fstype="${devicetype#*TYPE=\"}"
+ echo "${fstype=%%\"*}"
}
CMDLINE=$(getcmdline)