]> granicus.if.org Git - zfs/commitdiff
Install basename utility into dracut initramfs
authorSteffen Müthing <steffen.muething@iwr.uni-heidelberg.de>
Wed, 30 May 2018 00:32:05 +0000 (02:32 +0200)
committerBrian Behlendorf <behlendorf1@llnl.gov>
Wed, 30 May 2018 00:32:05 +0000 (17:32 -0700)
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 <behlendorf1@llnl.gov>
Signed-off-by: Steffen Müthing <steffen.muething@iwr.uni-heidelberg.de>
Closes #7562

contrib/dracut/90zfs/module-setup.sh.in

index f5a6bcbd9f6937a78faf5ba1a350f2402624cee6..4e2edf1e8e9a56f3337fedcce50c9691f3776f8a 100755 (executable)
@@ -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"