From e2d936e0f893084384a0d29ddf2edfd9f68deaf2 Mon Sep 17 00:00:00 2001 From: LOLi Date: Sun, 17 Dec 2017 23:14:07 +0100 Subject: Honor --with-mounthelperdir where applicable Reviewed-by: Brian Behlendorf Signed-off-by: Giuseppe Di Natale Signed-off-by: loli10K Closes #6962 --- contrib/dracut/90zfs/Makefile.am | 1 + contrib/dracut/90zfs/module-setup.sh.in | 4 ++-- contrib/initramfs/hooks/Makefile.am | 1 + contrib/initramfs/hooks/zfs.in | 6 ++---- 4 files changed, 6 insertions(+), 6 deletions(-) (limited to 'contrib') diff --git a/contrib/dracut/90zfs/Makefile.am b/contrib/dracut/90zfs/Makefile.am index 243a5200f..a8f08bed7 100644 --- a/contrib/dracut/90zfs/Makefile.am +++ b/contrib/dracut/90zfs/Makefile.am @@ -24,6 +24,7 @@ $(pkgdracut_SCRIPTS):%:%.in -e 's,@udevruledir\@,$(udevruledir),g' \ -e 's,@sysconfdir\@,$(sysconfdir),g' \ -e 's,@systemdunitdir\@,$(systemdunitdir),g' \ + -e 's,@mounthelperdir\@,$(mounthelperdir),g' \ $< >'$@' distclean-local:: diff --git a/contrib/dracut/90zfs/module-setup.sh.in b/contrib/dracut/90zfs/module-setup.sh.in index 0f85c2a25..1d41c265f 100755 --- a/contrib/dracut/90zfs/module-setup.sh.in +++ b/contrib/dracut/90zfs/module-setup.sh.in @@ -5,7 +5,7 @@ check() { [ "${1}" = "-d" ] && return 0 # Verify the zfs tool chain - for tool in "@sbindir@/zpool" "@sbindir@/zfs" "@sbindir@/mount.zfs" ; do + for tool in "@sbindir@/zpool" "@sbindir@/zfs" "@mounthelperdir@/mount.zfs" ; do test -x "$tool" || return 1 done # Verify grep exists @@ -54,7 +54,7 @@ install() { # Fallback: Guess the path and include all matches dracut_install /usr/lib/gcc/*/*/libgcc_s.so* fi - dracut_install @sbindir@/mount.zfs + dracut_install @mounthelperdir@/mount.zfs dracut_install @udevdir@/vdev_id dracut_install awk dracut_install head diff --git a/contrib/initramfs/hooks/Makefile.am b/contrib/initramfs/hooks/Makefile.am index 0c42643f5..c866b4fb6 100644 --- a/contrib/initramfs/hooks/Makefile.am +++ b/contrib/initramfs/hooks/Makefile.am @@ -11,6 +11,7 @@ $(hooks_SCRIPTS):%:%.in -e 's,@sysconfdir\@,$(sysconfdir),g' \ -e 's,@udevdir\@,$(udevdir),g' \ -e 's,@udevruledir\@,$(udevruledir),g' \ + -e 's,@mounthelperdir\@,$(mounthelperdir),g' \ $< >'$@' clean-local:: diff --git a/contrib/initramfs/hooks/zfs.in b/contrib/initramfs/hooks/zfs.in index b34cad1e8..d927d3d41 100755 --- a/contrib/initramfs/hooks/zfs.in +++ b/contrib/initramfs/hooks/zfs.in @@ -8,10 +8,8 @@ PREREQ="zdev" # These prerequisites are provided by the zfsutils package. The zdb utility is # not strictly required, but it can be useful at the initramfs recovery prompt. -# The mount helper mount.zfs must be installed in /sbin because this path is -# hardcoded in the mount(8) for security reasons. -COPY_EXEC_LIST="@sbindir@/zdb @sbindir@/zpool @sbindir@/zfs /sbin/mount.zfs" -COPY_EXEC_LIST="$COPY_EXEC_LIST @udevdir@/vdev_id" +COPY_EXEC_LIST="@sbindir@/zdb @sbindir@/zpool @sbindir@/zfs" +COPY_EXEC_LIST="$COPY_EXEC_LIST @mounthelperdir@/mount.zfs @udevdir@/vdev_id" COPY_FILE_LIST="/etc/hostid @sysconfdir@/zfs/zpool.cache" COPY_FILE_LIST="$COPY_FILE_LIST @sysconfdir@/default/zfs" COPY_FILE_LIST="$COPY_FILE_LIST @sysconfdir@/zfs/zfs-functions" -- cgit v1.2.3