]> granicus.if.org Git - zfs/commitdiff
Make directory into which mount.zfs is installed configurable
authorRichard Yao <richard.yao@clusterhq.com>
Fri, 29 Aug 2014 18:16:41 +0000 (14:16 -0400)
committerBrian Behlendorf <behlendorf1@llnl.gov>
Tue, 28 Oct 2014 16:40:59 +0000 (09:40 -0700)
Installing outside of the prefix is not permissible under Gentoo Prefix.
The package manager will cause the installation process to fail if/when
it sees this. I could script a workaround inside the ebuild, but it
seemed to make more sense to make this more configurable.

Signed-off-by: Richard Yao <richard.yao@clusterhq.com>
Signed-off-by: Brian Behlendorf <behlendorf1@llnl.gov>
Issue #2641

cmd/mount_zfs/Makefile.am
config/mount-helper.m4 [new file with mode: 0644]
config/user.m4

index e5f3d083b0a4f71a91d1202c423ebd1485379ef3..2e56631735dc5fe040f88325a5af491847773137 100644 (file)
@@ -8,7 +8,7 @@ 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.
 #
-sbindir=/sbin
+sbindir=$(mounthelperdir)
 sbin_PROGRAMS = mount.zfs
 
 mount_zfs_SOURCES = \
diff --git a/config/mount-helper.m4 b/config/mount-helper.m4
new file mode 100644 (file)
index 0000000..ad494f1
--- /dev/null
@@ -0,0 +1,8 @@
+AC_DEFUN([ZFS_AC_CONFIG_USER_MOUNT_HELPER], [
+       AC_ARG_WITH(mounthelperdir,
+               AC_HELP_STRING([--with-mounthelperdir=DIR],
+               [install mount.zfs in dir [[/sbin]]]),
+               mounthelperdir=$withval,mounthelperdir=$sbindir)
+
+       AC_SUBST(mounthelperdir)
+])
index d7ac3f24fac35f27e37f98a69be734163748a601..7f79420825645423613a3de472a73534522466c8 100644 (file)
@@ -2,6 +2,7 @@ dnl #
 dnl # Default ZFS user configuration
 dnl #
 AC_DEFUN([ZFS_AC_CONFIG_USER], [
+       ZFS_AC_CONFIG_USER_MOUNT_HELPER
        ZFS_AC_CONFIG_USER_UDEV
        ZFS_AC_CONFIG_USER_SYSTEMD
        ZFS_AC_CONFIG_USER_SYSVINIT