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 <richard.yao@clusterhq.com>
Signed-off-by: Brian Behlendorf <behlendorf1@llnl.gov>
Issue #2641
This commit is contained in:
Richard Yao 2014-09-18 09:47:16 -04:00 committed by Brian Behlendorf
parent 60e9f69c97
commit b76707027c
1 changed files with 7 additions and 1 deletions

View File

@ -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)