From 12d06bac9b22b11d8a322dfea4bdb50b106c254f Mon Sep 17 00:00:00 2001 From: Kyle Fuller Date: Fri, 5 Aug 2011 20:22:58 +0100 Subject: Move udev rules from /etc/udev to /lib/udev This change moves the default install location for the zfs udev rules from /etc/udev/ to /lib/udev/. The correct convention is for rules provided by a package to be installed in /lib/udev/. The /etc/udev/ directory is reserved for custom rules or local overrides. Additionally, this patch cleans up some abuse of the bindir install location by adding a udevdir and udevruledir install directories. This allows us to revert to the default bin install location. The udev install directories can be set with the following new options. --with-udevdir=DIR install udev helpers [EPREFIX/lib/udev] --with-udevruledir=DIR install udev rules [UDEVDIR/rules.d] Signed-off-by: Brian Behlendorf Closes #356 --- config/user-udev.m4 | 14 ++++++++++++++ config/user.m4 | 1 + 2 files changed, 15 insertions(+) create mode 100644 config/user-udev.m4 (limited to 'config') diff --git a/config/user-udev.m4 b/config/user-udev.m4 new file mode 100644 index 000000000..47da60478 --- /dev/null +++ b/config/user-udev.m4 @@ -0,0 +1,14 @@ +AC_DEFUN([ZFS_AC_CONFIG_USER_UDEV], [ + AC_ARG_WITH(udevdir, + AC_HELP_STRING([--with-udevdir=DIR], + [install udev helpers [[EPREFIX/lib/udev]]]), + udevdir=$withval, udevdir='${exec_prefix}/lib/udev') + + AC_ARG_WITH(udevruledir, + AC_HELP_STRING([--with-udevruledir=DIR], + [install udev rules [[UDEVDIR/rules.d]]]), + udevruledir=$withval, udevruledir='${udevdir}/rules.d') + + AC_SUBST(udevdir) + AC_SUBST(udevruledir) +]) diff --git a/config/user.m4 b/config/user.m4 index a79deefe8..4fcef3d5b 100644 --- a/config/user.m4 +++ b/config/user.m4 @@ -2,6 +2,7 @@ dnl # dnl # Default ZFS user configuration dnl # AC_DEFUN([ZFS_AC_CONFIG_USER], [ + ZFS_AC_CONFIG_USER_UDEV ZFS_AC_CONFIG_USER_ARCH ZFS_AC_CONFIG_USER_IOCTL ZFS_AC_CONFIG_USER_ZLIB -- cgit v1.2.3