summaryrefslogtreecommitdiff
path: root/eclass
diff options
context:
space:
mode:
authorMike Gilbert <floppym@gentoo.org>2017-11-30 15:42:22 -0500
committerMike Gilbert <floppym@gentoo.org>2017-12-09 13:22:20 -0500
commitd95c9b270ed98a364ccc5a722744e497874f33f1 (patch)
tree0103006d7052d7aa30f8b70038f5fa44f912f542 /eclass
parentsys-kernel/vanilla-sources: Automated version bump to {4.1.47,4.4.105} - remo... (diff)
downloadgentoo-d95c9b270ed98a364ccc5a722744e497874f33f1.tar.gz
gentoo-d95c9b270ed98a364ccc5a722744e497874f33f1.tar.bz2
gentoo-d95c9b270ed98a364ccc5a722744e497874f33f1.zip
systemd.eclass: add systemd_get_systemgeneratordir
This is needed for sys-process/systemd-cron.
Diffstat (limited to 'eclass')
-rw-r--r--eclass/systemd.eclass20
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: