Adapt genkernel fix for zfsonlinux/zfs#4749 to zfs dracut module

Signed-off-by: Moritz Maxeiner <moritz@ucworks.org>
Reviewed-by: Brian Behlendorf <behlendorf1@llnl.gov>
Closes #4749
Closes #5058
This commit is contained in:
Moritz Maxeiner 2016-09-01 18:15:10 +02:00 committed by Brian Behlendorf
parent 679d73e98b
commit 61c7349439
1 changed files with 6 additions and 0 deletions

View File

@ -38,6 +38,12 @@ install() {
dracut_install grep dracut_install grep
dracut_install @sbindir@/zfs dracut_install @sbindir@/zfs
dracut_install @sbindir@/zpool dracut_install @sbindir@/zpool
# Include libgcc_s.so.1 to workaround zfsonlinux/zfs#4749
if type gcc-config 2>&1 1>/dev/null; then
dracut_install "/usr/lib/gcc/$(s=$(gcc-config -c); echo ${s%-*}/${s##*-})/libgcc_s.so.1"
else
dracut_install /usr/lib/gcc/*/*/libgcc_s.so.1
fi
dracut_install @sbindir@/mount.zfs dracut_install @sbindir@/mount.zfs
dracut_install @udevdir@/vdev_id dracut_install @udevdir@/vdev_id
dracut_install @udevdir@/zvol_id dracut_install @udevdir@/zvol_id