diff options
author | Zac Medico <zmedico@gentoo.org> | 2011-07-28 13:47:50 +0000 |
---|---|---|
committer | Zac Medico <zmedico@gentoo.org> | 2011-07-28 13:47:50 +0000 |
commit | 6bf197cd23d6eddc91551f9ed81ebf367e9fad20 (patch) | |
tree | e942fb00c9f0dd13cdc45898fd0fd87ebf43411f /eclass/systemd.eclass | |
parent | unleash TeX Live 2011 to ~arch (diff) | |
download | historical-6bf197cd23d6eddc91551f9ed81ebf367e9fad20.tar.gz historical-6bf197cd23d6eddc91551f9ed81ebf367e9fad20.tar.bz2 historical-6bf197cd23d6eddc91551f9ed81ebf367e9fad20.zip |
systemd_dounit: fix for prefix
Diffstat (limited to 'eclass/systemd.eclass')
-rw-r--r-- | eclass/systemd.eclass | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/eclass/systemd.eclass b/eclass/systemd.eclass index f171a9b36bff..86bc6d1d0a2f 100644 --- a/eclass/systemd.eclass +++ b/eclass/systemd.eclass @@ -1,6 +1,6 @@ # Copyright 1999-2011 Gentoo Foundation # Distributed under the terms of the GNU General Public License v2 -# $Header: /var/cvsroot/gentoo-x86/eclass/systemd.eclass,v 1.6 2011/06/24 13:13:24 darkside Exp $ +# $Header: /var/cvsroot/gentoo-x86/eclass/systemd.eclass,v 1.7 2011/07/28 13:47:50 zmedico Exp $ # @ECLASS: systemd.eclass # @MAINTAINER: @@ -47,10 +47,12 @@ systemd_get_unitdir() { # Install systemd unit(s). Uses doins, thus it is fatal in EAPI 4 # and non-fatal in earlier EAPIs. systemd_dounit() { + has "${EAPI:-0}" 0 1 2 && ! use prefix && EPREFIX= debug-print-function ${FUNCNAME} "${@}" ( - insinto "$(systemd_get_unitdir)" + local ud=$(systemd_get_unitdir) + insinto "${ud#${EPREFIX}}" doins "${@}" ) } |