1 |
commit: b276da8ae379f7eb0dcb9e9020bb37035db3376c |
2 |
Author: Michał Górny <mgorny <AT> gentoo <DOT> org> |
3 |
AuthorDate: Sun Apr 30 18:54:33 2017 +0000 |
4 |
Commit: Michał Górny <mgorny <AT> gentoo <DOT> org> |
5 |
CommitDate: Mon Jan 1 10:34:44 2018 +0000 |
6 |
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=b276da8a |
7 |
|
8 |
tmpfiles.eclass: Explicit warn on ROOT != / to avoid breakage |
9 |
|
10 |
Closes: https://github.com/gentoo/gentoo/pull/4526 |
11 |
|
12 |
eclass/tmpfiles.eclass | 13 ++++++++++++- |
13 |
1 file changed, 12 insertions(+), 1 deletion(-) |
14 |
|
15 |
diff --git a/eclass/tmpfiles.eclass b/eclass/tmpfiles.eclass |
16 |
index 49c3cba6bdd..6a461d4df85 100644 |
17 |
--- a/eclass/tmpfiles.eclass |
18 |
+++ b/eclass/tmpfiles.eclass |
19 |
@@ -110,7 +110,18 @@ tmpfiles_process() { |
20 |
[[ ${#} -gt 0 ]] || die "${FUNCNAME}: Must specify at least one filename" |
21 |
|
22 |
# Only process tmpfiles for the currently running system |
23 |
- [[ ${ROOT} == / ]] || return 0 |
24 |
+ if [[ ${ROOT} != / ]]; then |
25 |
+ ewarn "Warning: tmpfiles.d not processed on ROOT != /. If you do not use" |
26 |
+ ewarn "a service manager supporting tmpfiles.d, you need to run" |
27 |
+ ewarn "the following command after booting (or chroot-ing with all" |
28 |
+ ewarn "appropriate filesystems mounted) into the ROOT:" |
29 |
+ ewarn |
30 |
+ ewarn " tmpfiles --create" |
31 |
+ ewarn |
32 |
+ ewarn "Failure to do so may result in missing runtime directories" |
33 |
+ ewarn "and failures to run programs or start services." |
34 |
+ return |
35 |
+ fi |
36 |
|
37 |
if type systemd-tmpfiles &> /dev/null; then |
38 |
systemd-tmpfiles --create "$@" |