From b76707027ceca056f8630cbc6660b8e9aa0a8f37 Mon Sep 17 00:00:00 2001 From: Richard Yao Date: Thu, 18 Sep 2014 09:47:16 -0400 Subject: [PATCH] Make systemd-modules-load.service file directory configurable 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. We could handle this by disabling systemd support on prefix because systemd does not check these paths, but the Gentoo Council decided that small files such as these should be installed. That means disabling systemd support on prefix is not an acceptable workaround. As a consequence, we need some way of control the directory into which these files are installed. Making this configurable increases our compliance with the freedesktop.org specification, which allows these files to be installed into /etc/modules-load.d: http://www.freedesktop.org/software/systemd/man/modules-load.d.html Signed-off-by: Richard Yao Signed-off-by: Brian Behlendorf Issue #2641 --- config/user-systemd.m4 | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/config/user-systemd.m4 b/config/user-systemd.m4 index 5988945b44..c2105abce0 100644 --- a/config/user-systemd.m4 +++ b/config/user-systemd.m4 @@ -14,11 +14,17 @@ AC_DEFUN([ZFS_AC_CONFIG_USER_SYSTEMD], [ [install systemd preset files in dir [[/usr/lib/systemd/system-preset]]]), systemdpresetdir=$withval,systemdpresetdir=/usr/lib/systemd/system-preset) + AC_ARG_WITH(systemdmodulesloaddir, + AC_HELP_STRING([--with-systemdmodulesloaddir=DIR], + [install systemd module load files into dir [[/usr/lib/modules-load.d]]]), + systemdmoduleloaddir=$withval,systemdmodulesloaddir=/usr/lib/modules-load.d) + + AS_IF([test "x$enable_systemd" = xyes], [ ZFS_INIT_SYSTEMD=systemd ZFS_MODULE_LOAD=modules-load.d - modulesloaddir=/usr/lib/modules-load.d + modulesloaddir=$systemdmodulesloaddir ]) AC_SUBST(ZFS_INIT_SYSTEMD)