From 3c28c636424f26b5638e27d238fd52e6598e9900 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Steffen=20M=C3=BCthing?= Date: Wed, 30 May 2018 02:32:05 +0200 Subject: [PATCH] Install basename utility into dracut initramfs MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit vdev_id requires the program `basename` when handling short aliases defined in `vdev_id.conf` (those defined without a leading path), but `basename` is not always available in the dracut environment. This causes the pool device names to change when using `by-vdev/` devices or (in extreme cases) can make the pool import fail in dracut. This commit fixes the problem by explicitly installing `basename`. Reviewed-by: Brian Behlendorf Signed-off-by: Steffen Müthing Closes #7562 --- contrib/dracut/90zfs/module-setup.sh.in | 1 + 1 file changed, 1 insertion(+) diff --git a/contrib/dracut/90zfs/module-setup.sh.in b/contrib/dracut/90zfs/module-setup.sh.in index f5a6bcbd9f..4e2edf1e8e 100755 --- a/contrib/dracut/90zfs/module-setup.sh.in +++ b/contrib/dracut/90zfs/module-setup.sh.in @@ -58,6 +58,7 @@ install() { dracut_install @mounthelperdir@/mount.zfs dracut_install @udevdir@/vdev_id dracut_install awk + dracut_install basename dracut_install head dracut_install @udevdir@/zvol_id inst_hook cmdline 95 "${moddir}/parse-zfs.sh"