/[gentoo-x86]/eclass/systemd.eclass
Gentoo

Diff of /eclass/systemd.eclass

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

Revision 1.26 Revision 1.27
1# Copyright 1999-2013 Gentoo Foundation 1# Copyright 1999-2013 Gentoo Foundation
2# Distributed under the terms of the GNU General Public License v2 2# Distributed under the terms of the GNU General Public License v2
3# $Header: /var/cvsroot/gentoo-x86/eclass/systemd.eclass,v 1.26 2013/07/27 10:36:55 mgorny Exp $ 3# $Header: /var/cvsroot/gentoo-x86/eclass/systemd.eclass,v 1.27 2013/09/11 07:58:00 mgorny Exp $
4 4
5# @ECLASS: systemd.eclass 5# @ECLASS: systemd.eclass
6# @MAINTAINER: 6# @MAINTAINER:
7# systemd@gentoo.org 7# systemd@gentoo.org
8# @BLURB: helper functions to install systemd units 8# @BLURB: helper functions to install systemd units
111# Install systemd unit(s). Uses doins, thus it is fatal in EAPI 4 111# Install systemd unit(s). Uses doins, thus it is fatal in EAPI 4
112# and non-fatal in earlier EAPIs. 112# and non-fatal in earlier EAPIs.
113systemd_dounit() { 113systemd_dounit() {
114 debug-print-function ${FUNCNAME} "${@}" 114 debug-print-function ${FUNCNAME} "${@}"
115 115
116 local INSDESTTREE 116 (
117 insinto "$(_systemd_get_unitdir)" 117 insinto "$(_systemd_get_unitdir)"
118 doins "${@}" 118 doins "${@}"
119 )
119} 120}
120 121
121# @FUNCTION: systemd_newunit 122# @FUNCTION: systemd_newunit
122# @USAGE: oldname newname 123# @USAGE: oldname newname
123# @DESCRIPTION: 124# @DESCRIPTION:
124# Install systemd unit with a new name. Uses newins, thus it is fatal 125# Install systemd unit with a new name. Uses newins, thus it is fatal
125# in EAPI 4 and non-fatal in earlier EAPIs. 126# in EAPI 4 and non-fatal in earlier EAPIs.
126systemd_newunit() { 127systemd_newunit() {
127 debug-print-function ${FUNCNAME} "${@}" 128 debug-print-function ${FUNCNAME} "${@}"
128 129
129 local INSDESTTREE 130 (
130 insinto "$(_systemd_get_unitdir)" 131 insinto "$(_systemd_get_unitdir)"
131 newins "${@}" 132 newins "${@}"
133 )
132} 134}
133 135
134# @FUNCTION: systemd_dotmpfilesd 136# @FUNCTION: systemd_dotmpfilesd
135# @USAGE: tmpfilesd1 [...] 137# @USAGE: tmpfilesd1 [...]
136# @DESCRIPTION: 138# @DESCRIPTION:
142 for f; do 144 for f; do
143 [[ ${f} == *.conf ]] \ 145 [[ ${f} == *.conf ]] \
144 || die 'tmpfiles.d files need to have .conf suffix.' 146 || die 'tmpfiles.d files need to have .conf suffix.'
145 done 147 done
146 148
147 local INSDESTTREE 149 (
148 insinto /usr/lib/tmpfiles.d/ 150 insinto /usr/lib/tmpfiles.d/
149 doins "${@}" 151 doins "${@}"
152 )
150} 153}
151 154
152# @FUNCTION: systemd_newtmpfilesd 155# @FUNCTION: systemd_newtmpfilesd
153# @USAGE: oldname newname.conf 156# @USAGE: oldname newname.conf
154# @DESCRIPTION: 157# @DESCRIPTION:
158 debug-print-function ${FUNCNAME} "${@}" 161 debug-print-function ${FUNCNAME} "${@}"
159 162
160 [[ ${2} == *.conf ]] \ 163 [[ ${2} == *.conf ]] \
161 || die 'tmpfiles.d files need to have .conf suffix.' 164 || die 'tmpfiles.d files need to have .conf suffix.'
162 165
163 local INSDESTTREE 166 (
164 insinto /usr/lib/tmpfiles.d/ 167 insinto /usr/lib/tmpfiles.d/
165 newins "${@}" 168 newins "${@}"
169 )
166} 170}
167 171
168# @FUNCTION: systemd_enable_service 172# @FUNCTION: systemd_enable_service
169# @USAGE: target service 173# @USAGE: target service
170# @DESCRIPTION: 174# @DESCRIPTION:

Legend:
Removed from v.1.26  
changed lines
  Added in v.1.27

  ViewVC Help
Powered by ViewVC 1.1.20