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 | |
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')
-rw-r--r-- | eclass/ChangeLog | 5 | ||||
-rw-r--r-- | eclass/systemd.eclass | 14 |
2 files changed, 17 insertions, 2 deletions
diff --git a/eclass/ChangeLog b/eclass/ChangeLog index 8ee22daa383c..a9a3bb5f4e10 100644 --- a/eclass/ChangeLog +++ b/eclass/ChangeLog @@ -1,6 +1,9 @@ # ChangeLog for eclass directory # Copyright 1999-2012 Gentoo Foundation; Distributed under the GPL v2 -# $Header: /var/cvsroot/gentoo-x86/eclass/ChangeLog,v 1.584 2012/12/31 13:08:12 mgorny Exp $ +# $Header: /var/cvsroot/gentoo-x86/eclass/ChangeLog,v 1.585 2012/12/31 13:09:09 mgorny Exp $ + + 31 Dec 2012; Michał Górny <mgorny@gentoo.org> systemd.eclass: + Add function to get user unit directory, as requested in bug #449304. 31 Dec 2012; Michał Górny <mgorny@gentoo.org> systemd.eclass: Add function to update systemd journal catalog database. 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 |