From d95c9b270ed98a364ccc5a722744e497874f33f1 Mon Sep 17 00:00:00 2001 From: Mike Gilbert Date: Thu, 30 Nov 2017 15:42:22 -0500 Subject: [PATCH] systemd.eclass: add systemd_get_systemgeneratordir This is needed for sys-process/systemd-cron. --- eclass/systemd.eclass | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) 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: ... # @DESCRIPTION: -- 2.26.2