diff options
Diffstat (limited to 'eclass')
-rw-r--r-- | eclass/systemd.eclass | 20 |
1 files changed, 20 insertions, 0 deletions
diff --git a/eclass/systemd.eclass b/eclass/systemd.eclass index 63ff5609589d..cc3591b3301b 100644 --- a/eclass/systemd.eclass +++ b/eclass/systemd.eclass @@ -121,6 +121,26 @@ systemd_get_utildir() { echo "${EPREFIX}$(_systemd_get_utildir)" } +# @FUNCTION: _systemd_get_systemgeneratordir +# @INTERNAL +# @DESCRIPTION: +# Get unprefixed systemgeneratordir. +_systemd_get_systemgeneratordir() { + _systemd_get_dir systemdsystemgeneratordir /usr/lib/systemd/system-generators +} + +# @FUNCTION: systemd_get_systemgeneratordir +# @DESCRIPTION: +# Output the path for the systemd system generator directory (not including +# ${D}). This function always succeeds, even if systemd is not +# installed. +systemd_get_systemgeneratordir() { + has "${EAPI:-0}" 0 1 2 && ! use prefix && EPREFIX= + debug-print-function ${FUNCNAME} "${@}" + + echo "${EPREFIX}$(_systemd_get_systemgeneratordir)" +} + # @FUNCTION: systemd_dounit # @USAGE: <unit>... # @DESCRIPTION: |