From 999be5bb496091678e1b5004334307dec7004a4a Mon Sep 17 00:00:00 2001 From: Jonathan Lebon Date: Fri, 1 Oct 2021 13:22:25 -0400 Subject: [PATCH] boot.mount: don't use mpath path if rd.multipath=0 We have a `karg` utility function already in scope we can use for this. --- .../dracut/modules.d/35coreos-ignition/coreos-boot-edit.sh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/overlay.d/05core/usr/lib/dracut/modules.d/35coreos-ignition/coreos-boot-edit.sh b/overlay.d/05core/usr/lib/dracut/modules.d/35coreos-ignition/coreos-boot-edit.sh index 66fd1f2a81..86b4e51a17 100755 --- a/overlay.d/05core/usr/lib/dracut/modules.d/35coreos-ignition/coreos-boot-edit.sh +++ b/overlay.d/05core/usr/lib/dracut/modules.d/35coreos-ignition/coreos-boot-edit.sh @@ -43,8 +43,8 @@ if [ ! -f "/sysroot/${mntfile}" ]; then # that creates "label found on mpath" links. # Otherwise, use the usual by-label symlink. # See discussion in https://github.com/coreos/fedora-coreos-config/pull/1022 - # TODO add equivalent of getargbool() so we handle rd.multipath=0 - if [ -n "$(karg rd.multipath)" ]; then + mpath=$(karg rd.multipath) + if [ -n "${mpath}" ] && [ "${mpath}" != 0 ]; then bootdev=/dev/disk/by-label/dm-mpath-boot fi