]> git.ipfire.org Git - thirdparty/dracut.git/commitdiff
feat(fs-lib): fsck_single can now handle PARTLABEL and PARTUUID
authorLaszlo Gombos <laszlo.gombos@gmail.com>
Fri, 26 Aug 2022 12:10:38 +0000 (12:10 +0000)
committerJóhann B. Guðmundsson <johannbg@gmail.com>
Sat, 3 Dec 2022 14:09:31 +0000 (14:09 +0000)
As an additional benefit, gentoo container now passing test-01.

modules.d/99fs-lib/fs-lib.sh

index e05fa0c5068c5d81ba5c8a433306c4287bdce434..dd20731f29a68e1f913314bfc574bab99e351515 100755 (executable)
@@ -146,11 +146,7 @@ fsck_single() {
     local _drv
 
     [ $# -lt 2 ] && return 255
-    # if UUID= marks more than one device, take only the first one
-    [ -e "$_dev" ] || _dev=$(devnames "$_dev" | while read -r line || [ -n "$line" ]; do if [ -n "$line" ]; then
-        echo "$line"
-        break
-    fi; done)
+    _dev=$(readlink -f "$(label_uuid_to_dev "$_dev")")
     [ -e "$_dev" ] || return 255
     _fs=$(det_fs "$_dev" "$_fs")
     fsck_able "$_fs" || return 255