Gentoo Archives: gentoo-dev

From: "Michał Górny" <mgorny@g.o>
To: gentoo-dev@l.g.o
Cc: "Michał Górny" <mgorny@g.o>
Subject: [gentoo-dev] [PATCH systemd.eclass 2/3] tmpfiles.d: check for .conf suffix when installing.
Date: Mon, 20 Aug 2012 22:25:59
Message-Id: 1345501451-5596-2-git-send-email-mgorny@gentoo.org
In Reply to: [gentoo-dev] [PATCH systemd.eclass 1/3] Add systemd_newtmpfilesd(). by "Michał Górny"
1 This could help a few users avoid debugging why the rules don't work for
2 them.
3 ---
4 gx86/eclass/systemd.eclass | 8 ++++++++
5 1 file changed, 8 insertions(+)
6
7 diff --git a/gx86/eclass/systemd.eclass b/gx86/eclass/systemd.eclass
8 index 4066e31..1ccaadc 100644
9 --- a/gx86/eclass/systemd.eclass
10 +++ b/gx86/eclass/systemd.eclass
11 @@ -89,6 +89,11 @@ systemd_newunit() {
12 systemd_dotmpfilesd() {
13 debug-print-function ${FUNCNAME} "${@}"
14
15 + for f; do
16 + [[ ${f} == *.conf ]] \
17 + || die 'tmpfiles.d files need to have .conf suffix.'
18 + done
19 +
20 (
21 insinto /usr/lib/tmpfiles.d/
22 doins "${@}"
23 @@ -103,6 +108,9 @@ systemd_dotmpfilesd() {
24 systemd_newtmpfilesd() {
25 debug-print-function ${FUNCNAME} "${@}"
26
27 + [[ ${2} == *.conf ]] \
28 + || die 'tmpfiles.d files need to have .conf suffix.'
29 +
30 (
31 insinto /usr/lib/tmpfiles.d/
32 newins "${@}"
33 --
34 1.7.11.1