summaryrefslogtreecommitdiffstats
path: root/contrib/initramfs
diff options
context:
space:
mode:
authorLOLi <[email protected]>2017-12-17 23:14:07 +0100
committerBrian Behlendorf <[email protected]>2017-12-17 14:14:07 -0800
commite2d936e0f893084384a0d29ddf2edfd9f68deaf2 (patch)
tree920a5959b5fffbb4add40a3fc4ce4354c4a6ac4e /contrib/initramfs
parentee410eefc2a9c0f0e77bd765894ee7767af647ea (diff)
Honor --with-mounthelperdir where applicable
Reviewed-by: Brian Behlendorf <[email protected]> Signed-off-by: Giuseppe Di Natale <[email protected]> Signed-off-by: loli10K <[email protected]> Closes #6962
Diffstat (limited to 'contrib/initramfs')
-rw-r--r--contrib/initramfs/hooks/Makefile.am1
-rwxr-xr-xcontrib/initramfs/hooks/zfs.in6
2 files changed, 3 insertions, 4 deletions
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"