]> git.ipfire.org Git - thirdparty/dracut-ng.git/commitdiff
feat(dmsquash-live): add busybox blkid compatibility main
authorJo Zzsi <jozzsicsataban@gmail.com>
Sat, 7 Feb 2026 17:09:13 +0000 (12:09 -0500)
committerNeal Gompa (ニール・ゴンパ) <ngompa13@gmail.com>
Wed, 29 Apr 2026 14:06:14 +0000 (10:06 -0400)
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.

modules.d/70dmsquash-live/dmsquash-live-root.sh

index afbdc1393ef1ac165eefe80d45f176f51a4d0ef2..d41f242d7285398655e1ec1078f123b6f6ac78d4 100755 (executable)
@@ -95,7 +95,11 @@ ln -s "$livedev" /run/initramfs/livedev
 # 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)