Install basename utility into dracut initramfs

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
This commit is contained in:
Steffen Müthing 2018-05-30 02:32:05 +02:00 committed by Brian Behlendorf
parent 93ce2b4ca5
commit 3c28c63642

View File

@ -58,6 +58,7 @@ install() {
dracut_install @mounthelperdir@/mount.zfs dracut_install @mounthelperdir@/mount.zfs
dracut_install @udevdir@/vdev_id dracut_install @udevdir@/vdev_id
dracut_install awk dracut_install awk
dracut_install basename
dracut_install head dracut_install head
dracut_install @udevdir@/zvol_id dracut_install @udevdir@/zvol_id
inst_hook cmdline 95 "${moddir}/parse-zfs.sh" inst_hook cmdline 95 "${moddir}/parse-zfs.sh"