]> granicus.if.org Git - zfs/commitdiff
Honor --with-mounthelperdir where applicable
authorLOLi <loli10K@users.noreply.github.com>
Sun, 17 Dec 2017 22:14:07 +0000 (23:14 +0100)
committerBrian Behlendorf <behlendorf1@llnl.gov>
Sun, 17 Dec 2017 22:14:07 +0000 (14:14 -0800)
Reviewed-by: Brian Behlendorf <behlendorf1@llnl.gov>
Signed-off-by: Giuseppe Di Natale <dinatale2@llnl.gov>
Signed-off-by: loli10K <ezomori.nozomu@gmail.com>
Closes #6962

cmd/mount_zfs/Makefile.am
contrib/dracut/90zfs/Makefile.am
contrib/dracut/90zfs/module-setup.sh.in
contrib/initramfs/hooks/Makefile.am
contrib/initramfs/hooks/zfs.in

index bc9fb4c34bba6c1b816b2dc00452043334d7d662..7adedd63b6e66a1eedc878209474c3386ef0585f 100644 (file)
@@ -7,6 +7,8 @@ DEFAULT_INCLUDES += \
 #
 # Ignore the prefix for the mount helper.  It must be installed in /sbin/
 # because this path is hardcoded in the mount(8) for security reasons.
+# However, if needed, the configure option --with-mounthelperdir= can be used
+# to override the default install location.
 #
 sbindir=$(mounthelperdir)
 sbin_PROGRAMS = mount.zfs
index 243a5200fa1e9ffa3b50519bb785336e8e5bc507..a8f08bed72c26b8e7fd40544a1913d7e438b4b24 100644 (file)
@@ -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::
index 0f85c2a2505fc9ef8bfa156407fdbd1aa8133069..1d41c265f4df139104cc716297a1e717a243b15c 100755 (executable)
@@ -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
index 0c42643f5c05f32a94b6e65bb17f6f4648585974..c866b4fb6cd7ae3dd4633ec7d342d7fc6bbf572d 100644 (file)
@@ -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::
index b34cad1e8520348a271cd8e8ce9f70d9068570a4..d927d3d4164bb4317ed4ff44450d23347e93aa09 100755 (executable)
@@ -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"