Gentoo Archives: gentoo-dev

From: Mike Gilbert <floppym@g.o>
To: gentoo-dev@l.g.o
Cc: Mike Gilbert <floppym@g.o>
Subject: [gentoo-dev] [PATCH 3/5] systemd.eclass: introduce systemd_get_systempresetdir
Date: Sat, 18 Sep 2021 14:41:39
Message-Id: 20210918144053.780056-3-floppym@gentoo.org
In Reply to: [gentoo-dev] [PATCH 1/5] systemd.eclass: set PKG_CONFIG_FDO_SYSROOT_RULES by Mike Gilbert
1 Bug: https://bugs.gentoo.org/813639
2 Signed-off-by: Mike Gilbert <floppym@g.o>
3 ---
4 eclass/systemd.eclass | 18 ++++++++++++++++++
5 1 file changed, 18 insertions(+)
6
7 diff --git a/eclass/systemd.eclass b/eclass/systemd.eclass
8 index c80c4c43f31..7731bede094 100644
9 --- a/eclass/systemd.eclass
10 +++ b/eclass/systemd.eclass
11 @@ -145,6 +145,24 @@ systemd_get_systemgeneratordir() {
12 echo "${EPREFIX}$(_systemd_get_systemgeneratordir)"
13 }
14
15 +# @FUNCTION: _systemd_get_systempresetdir
16 +# @INTERNAL
17 +# @DESCRIPTION:
18 +# Get unprefixed systempresetdir.
19 +_systemd_get_systempresetdir() {
20 + _systemd_get_dir systemdsystempresetdir /lib/systemd/system-preset
21 +}
22 +
23 +# @FUNCTION: systemd_get_systempresetdir
24 +# @DESCRIPTION:
25 +# Output the path for the systemd system preset directory (not including
26 +# ${D}). This function always succeeds, even if systemd is not installed.
27 +systemd_get_systempresetdir() {
28 + debug-print-function ${FUNCNAME} "${@}"
29 +
30 + echo "${EPREFIX}$(_systemd_get_systempresetdir)"
31 +}
32 +
33 # @FUNCTION: systemd_dounit
34 # @USAGE: <unit>...
35 # @DESCRIPTION:
36 --
37 2.33.0