diff options
author | Mike Gilbert <floppym@gentoo.org> | 2021-09-18 10:35:51 -0400 |
---|---|---|
committer | Mike Gilbert <floppym@gentoo.org> | 2021-09-19 17:38:24 -0400 |
commit | b8f91fee6a8314dc58c1da011b65d9b857ef963f (patch) | |
tree | 5d5aea9aeae5b353ee32595711eb9a0a0e3a0ec4 /eclass | |
parent | udev.eclass: set PKG_CONFIG_FDO_SYSROOT_RULES (diff) | |
download | gentoo-b8f91fee6a8314dc58c1da011b65d9b857ef963f.tar.gz gentoo-b8f91fee6a8314dc58c1da011b65d9b857ef963f.tar.bz2 gentoo-b8f91fee6a8314dc58c1da011b65d9b857ef963f.zip |
systemd.eclass: introduce systemd_get_systempresetdir
Bug: https://bugs.gentoo.org/813639
Signed-off-by: Mike Gilbert <floppym@gentoo.org>
Diffstat (limited to 'eclass')
-rw-r--r-- | eclass/systemd.eclass | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/eclass/systemd.eclass b/eclass/systemd.eclass index c80c4c43f319..7731bede094e 100644 --- a/eclass/systemd.eclass +++ b/eclass/systemd.eclass @@ -145,6 +145,24 @@ systemd_get_systemgeneratordir() { echo "${EPREFIX}$(_systemd_get_systemgeneratordir)" } +# @FUNCTION: _systemd_get_systempresetdir +# @INTERNAL +# @DESCRIPTION: +# Get unprefixed systempresetdir. +_systemd_get_systempresetdir() { + _systemd_get_dir systemdsystempresetdir /lib/systemd/system-preset +} + +# @FUNCTION: systemd_get_systempresetdir +# @DESCRIPTION: +# Output the path for the systemd system preset directory (not including +# ${D}). This function always succeeds, even if systemd is not installed. +systemd_get_systempresetdir() { + debug-print-function ${FUNCNAME} "${@}" + + echo "${EPREFIX}$(_systemd_get_systempresetdir)" +} + # @FUNCTION: systemd_dounit # @USAGE: <unit>... # @DESCRIPTION: |