diff options
author | Michał Górny <mgorny@gentoo.org> | 2012-12-31 13:09:09 +0000 |
---|---|---|
committer | Michał Górny <mgorny@gentoo.org> | 2012-12-31 13:09:09 +0000 |
commit | 81df0a8c8a06e12922be97836c3a5df3a55e912a (patch) | |
tree | a4c814712fe7e3777143f99fd78cba32dda96941 /eclass/systemd.eclass | |
parent | Add function to update systemd journal catalog database. (diff) | |
download | gentoo-2-81df0a8c8a06e12922be97836c3a5df3a55e912a.tar.gz gentoo-2-81df0a8c8a06e12922be97836c3a5df3a55e912a.tar.bz2 gentoo-2-81df0a8c8a06e12922be97836c3a5df3a55e912a.zip |
Add function to get user unit directory, as requested in bug #449304.
Diffstat (limited to 'eclass/systemd.eclass')
-rw-r--r-- | eclass/systemd.eclass | 14 |
1 files changed, 13 insertions, 1 deletions
diff --git a/eclass/systemd.eclass b/eclass/systemd.eclass index 01ac05015d29..60aae0f59776 100644 --- a/eclass/systemd.eclass +++ b/eclass/systemd.eclass @@ -1,6 +1,6 @@ # Copyright 1999-2012 Gentoo Foundation # Distributed under the terms of the GNU General Public License v2 -# $Header: /var/cvsroot/gentoo-x86/eclass/systemd.eclass,v 1.20 2012/12/31 13:08:12 mgorny Exp $ +# $Header: /var/cvsroot/gentoo-x86/eclass/systemd.eclass,v 1.21 2012/12/31 13:09:09 mgorny Exp $ # @ECLASS: systemd.eclass # @MAINTAINER: @@ -49,6 +49,18 @@ systemd_get_unitdir() { echo "${EPREFIX}$(_systemd_get_unitdir)" } +# @FUNCTION: systemd_get_userunitdir +# @DESCRIPTION: +# Output the path for the systemd user unit directory (not including +# ${D}). This function always succeeds, even if systemd is not +# installed. +systemd_get_userunitdir() { + has "${EAPI:-0}" 0 1 2 && ! use prefix && EPREFIX= + debug-print-function ${FUNCNAME} "${@}" + + echo "${EPREFIX}/usr/lib/systemd/user" +} + # @FUNCTION: systemd_get_utildir # @DESCRIPTION: # Output the path for the systemd utility directory (not including |