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

Diff of /eclass/systemd.eclass

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

Revision 1.28 Revision 1.29
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.28 2013/09/11 08:50:07 mgorny Exp $ 3# $Header: /var/cvsroot/gentoo-x86/eclass/systemd.eclass,v 1.29 2013/09/11 08:53:18 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
104 104
105 echo "${EPREFIX}$(_systemd_get_utildir)" 105 echo "${EPREFIX}$(_systemd_get_utildir)"
106} 106}
107 107
108# @FUNCTION: systemd_dounit 108# @FUNCTION: systemd_dounit
109# @USAGE: unit1 [...] 109# @USAGE: <unit>...
110# @DESCRIPTION: 110# @DESCRIPTION:
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} "${@}"
118 doins "${@}" 118 doins "${@}"
119 ) 119 )
120} 120}
121 121
122# @FUNCTION: systemd_newunit 122# @FUNCTION: systemd_newunit
123# @USAGE: oldname newname 123# @USAGE: <old-name> <new-name>
124# @DESCRIPTION: 124# @DESCRIPTION:
125# 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
126# in EAPI 4 and non-fatal in earlier EAPIs. 126# in EAPI 4 and non-fatal in earlier EAPIs.
127systemd_newunit() { 127systemd_newunit() {
128 debug-print-function ${FUNCNAME} "${@}" 128 debug-print-function ${FUNCNAME} "${@}"
132 newins "${@}" 132 newins "${@}"
133 ) 133 )
134} 134}
135 135
136# @FUNCTION: systemd_dotmpfilesd 136# @FUNCTION: systemd_dotmpfilesd
137# @USAGE: tmpfilesd1 [...] 137# @USAGE: <tmpfilesd>...
138# @DESCRIPTION: 138# @DESCRIPTION:
139# Install systemd tmpfiles.d files. Uses doins, thus it is fatal 139# Install systemd tmpfiles.d files. Uses doins, thus it is fatal
140# in EAPI 4 and non-fatal in earlier EAPIs. 140# in EAPI 4 and non-fatal in earlier EAPIs.
141systemd_dotmpfilesd() { 141systemd_dotmpfilesd() {
142 debug-print-function ${FUNCNAME} "${@}" 142 debug-print-function ${FUNCNAME} "${@}"
151 doins "${@}" 151 doins "${@}"
152 ) 152 )
153} 153}
154 154
155# @FUNCTION: systemd_newtmpfilesd 155# @FUNCTION: systemd_newtmpfilesd
156# @USAGE: oldname newname.conf 156# @USAGE: <old-name> <new-name>.conf
157# @DESCRIPTION: 157# @DESCRIPTION:
158# Install systemd tmpfiles.d file under a new name. Uses newins, thus it 158# Install systemd tmpfiles.d file under a new name. Uses newins, thus it
159# is fatal in EAPI 4 and non-fatal in earlier EAPIs. 159# is fatal in EAPI 4 and non-fatal in earlier EAPIs.
160systemd_newtmpfilesd() { 160systemd_newtmpfilesd() {
161 debug-print-function ${FUNCNAME} "${@}" 161 debug-print-function ${FUNCNAME} "${@}"
168 newins "${@}" 168 newins "${@}"
169 ) 169 )
170} 170}
171 171
172# @FUNCTION: systemd_enable_service 172# @FUNCTION: systemd_enable_service
173# @USAGE: target service 173# @USAGE: <target> <service>
174# @DESCRIPTION: 174# @DESCRIPTION:
175# Enable service in desired target, e.g. install a symlink for it. 175# Enable service in desired target, e.g. install a symlink for it.
176# Uses dosym, thus it is fatal in EAPI 4 and non-fatal in earlier 176# Uses dosym, thus it is fatal in EAPI 4 and non-fatal in earlier
177# EAPIs. 177# EAPIs.
178systemd_enable_service() { 178systemd_enable_service() {
188 dodir "${ud}"/"${target}".wants && \ 188 dodir "${ud}"/"${target}".wants && \
189 dosym ../"${service}" "${ud}"/"${target}".wants/"${destname}" 189 dosym ../"${service}" "${ud}"/"${target}".wants/"${destname}"
190} 190}
191 191
192# @FUNCTION: systemd_with_unitdir 192# @FUNCTION: systemd_with_unitdir
193# @USAGE: [configure option] 193# @USAGE: [<configure-option-name>]
194# @DESCRIPTION: 194# @DESCRIPTION:
195# Output '--with-systemdsystemunitdir' as expected by systemd-aware configure 195# Output '--with-systemdsystemunitdir' as expected by systemd-aware configure
196# scripts. This function always succeeds. Its output may be quoted in order 196# scripts. This function always succeeds. Its output may be quoted in order
197# to preserve whitespace in paths. systemd_to_myeconfargs() is preferred over 197# to preserve whitespace in paths. systemd_to_myeconfargs() is preferred over
198# this function. 198# this function.

Legend:
Removed from v.1.28  
changed lines
  Added in v.1.29

  ViewVC Help
Powered by ViewVC 1.1.20