diff options
author | 2014-05-31 10:23:36 +0000 | |
---|---|---|
committer | 2014-05-31 10:23:36 +0000 | |
commit | 02f66dcf13558ecb74fcff0caed1ba347ec3538e (patch) | |
tree | 49ebd329022c3ace99c7986f8fde0fbb666568d3 /eclass/systemd.eclass | |
parent | Needs to be rebuilt with libgtop soname bumps (diff) | |
download | gentoo-2-02f66dcf13558ecb74fcff0caed1ba347ec3538e.tar.gz gentoo-2-02f66dcf13558ecb74fcff0caed1ba347ec3538e.tar.bz2 gentoo-2-02f66dcf13558ecb74fcff0caed1ba347ec3538e.zip |
Add systemd_{do,new}userunit.
Diffstat (limited to 'eclass/systemd.eclass')
-rw-r--r-- | eclass/systemd.eclass | 32 |
1 files changed, 30 insertions, 2 deletions
diff --git a/eclass/systemd.eclass b/eclass/systemd.eclass index c2dafbfc30c3..f06d85063b0c 100644 --- a/eclass/systemd.eclass +++ b/eclass/systemd.eclass @@ -1,6 +1,6 @@ -# Copyright 1999-2013 Gentoo Foundation +# Copyright 1999-2014 Gentoo Foundation # Distributed under the terms of the GNU General Public License v2 -# $Header: /var/cvsroot/gentoo-x86/eclass/systemd.eclass,v 1.31 2013/10/22 15:14:40 mgorny Exp $ +# $Header: /var/cvsroot/gentoo-x86/eclass/systemd.eclass,v 1.32 2014/05/31 10:23:36 mgorny Exp $ # @ECLASS: systemd.eclass # @MAINTAINER: @@ -133,6 +133,34 @@ systemd_newunit() { ) } +# @FUNCTION: systemd_douserunit +# @USAGE: <unit>... +# @DESCRIPTION: +# Install systemd user unit(s). Uses doins, thus it is fatal in EAPI 4 +# and non-fatal in earlier EAPIs. +systemd_douserunit() { + debug-print-function ${FUNCNAME} "${@}" + + ( + insinto "$(_systemd_get_userunitdir)" + doins "${@}" + ) +} + +# @FUNCTION: systemd_newuserunit +# @USAGE: <old-name> <new-name> +# @DESCRIPTION: +# Install systemd user unit with a new name. Uses newins, thus it +# is fatal in EAPI 4 and non-fatal in earlier EAPIs. +systemd_newuserunit() { + debug-print-function ${FUNCNAME} "${@}" + + ( + insinto "$(_systemd_get_userunitdir)" + newins "${@}" + ) +} + # @FUNCTION: systemd_install_serviced # @USAGE: <conf-file> [<service.d>] # @DESCRIPTION: |