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

Diff of /eclass/systemd.eclass

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

Revision 1.18 Revision 1.19
1# Copyright 1999-2012 Gentoo Foundation 1# Copyright 1999-2012 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.18 2012/10/30 21:56:31 mgorny Exp $ 3# $Header: /var/cvsroot/gentoo-x86/eclass/systemd.eclass,v 1.19 2012/11/21 09:06:42 mgorny Exp $
4 4
5# @ECLASS: systemd.eclass 5# @ECLASS: systemd.eclass
6# @MAINTAINER: 6# @MAINTAINER:
7# mgorny@gentoo.org 7# mgorny@gentoo.org
8# @BLURB: helper functions to install systemd units 8# @BLURB: helper functions to install systemd units
67# Install systemd unit(s). Uses doins, thus it is fatal in EAPI 4 67# Install systemd unit(s). Uses doins, thus it is fatal in EAPI 4
68# and non-fatal in earlier EAPIs. 68# and non-fatal in earlier EAPIs.
69systemd_dounit() { 69systemd_dounit() {
70 debug-print-function ${FUNCNAME} "${@}" 70 debug-print-function ${FUNCNAME} "${@}"
71 71
72 ( 72 local INSDESTTREE
73 insinto "$(_systemd_get_unitdir)" 73 insinto "$(_systemd_get_unitdir)"
74 doins "${@}" 74 doins "${@}"
75 )
76} 75}
77 76
78# @FUNCTION: systemd_newunit 77# @FUNCTION: systemd_newunit
79# @USAGE: oldname newname 78# @USAGE: oldname newname
80# @DESCRIPTION: 79# @DESCRIPTION:
81# Install systemd unit with a new name. Uses newins, thus it is fatal 80# Install systemd unit with a new name. Uses newins, thus it is fatal
82# in EAPI 4 and non-fatal in earlier EAPIs. 81# in EAPI 4 and non-fatal in earlier EAPIs.
83systemd_newunit() { 82systemd_newunit() {
84 debug-print-function ${FUNCNAME} "${@}" 83 debug-print-function ${FUNCNAME} "${@}"
85 84
86 ( 85 local INSDESTTREE
87 insinto "$(_systemd_get_unitdir)" 86 insinto "$(_systemd_get_unitdir)"
88 newins "${@}" 87 newins "${@}"
89 )
90} 88}
91 89
92# @FUNCTION: systemd_dotmpfilesd 90# @FUNCTION: systemd_dotmpfilesd
93# @USAGE: tmpfilesd1 [...] 91# @USAGE: tmpfilesd1 [...]
94# @DESCRIPTION: 92# @DESCRIPTION:
100 for f; do 98 for f; do
101 [[ ${f} == *.conf ]] \ 99 [[ ${f} == *.conf ]] \
102 || die 'tmpfiles.d files need to have .conf suffix.' 100 || die 'tmpfiles.d files need to have .conf suffix.'
103 done 101 done
104 102
105 ( 103 local INSDESTTREE
106 insinto /usr/lib/tmpfiles.d/ 104 insinto /usr/lib/tmpfiles.d/
107 doins "${@}" 105 doins "${@}"
108 )
109} 106}
110 107
111# @FUNCTION: systemd_newtmpfilesd 108# @FUNCTION: systemd_newtmpfilesd
112# @USAGE: oldname newname.conf 109# @USAGE: oldname newname.conf
113# @DESCRIPTION: 110# @DESCRIPTION:
117 debug-print-function ${FUNCNAME} "${@}" 114 debug-print-function ${FUNCNAME} "${@}"
118 115
119 [[ ${2} == *.conf ]] \ 116 [[ ${2} == *.conf ]] \
120 || die 'tmpfiles.d files need to have .conf suffix.' 117 || die 'tmpfiles.d files need to have .conf suffix.'
121 118
122 ( 119 local INSDESTTREE
123 insinto /usr/lib/tmpfiles.d/ 120 insinto /usr/lib/tmpfiles.d/
124 newins "${@}" 121 newins "${@}"
125 )
126} 122}
127 123
128# @FUNCTION: systemd_enable_service 124# @FUNCTION: systemd_enable_service
129# @USAGE: target service 125# @USAGE: target service
130# @DESCRIPTION: 126# @DESCRIPTION:

Legend:
Removed from v.1.18  
changed lines
  Added in v.1.19

  ViewVC Help
Powered by ViewVC 1.1.20