commit: d95c9b270ed98a364ccc5a722744e497874f33f1
Author: Mike Gilbert <floppym <AT> gentoo <DOT> org>
AuthorDate: Thu Nov 30 20:42:22 2017 +0000
Commit: Mike Gilbert <floppym <AT> gentoo <DOT> org>
CommitDate: Sat Dec 9 18:22:20 2017 +0000
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=d95c9b27
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 63ff5609589..cc3591b3301 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: