summaryrefslogtreecommitdiff
path: root/eclass
diff options
context:
space:
mode:
authorMichał Górny <mgorny@gentoo.org>2017-04-30 20:54:33 +0200
committerMichał Górny <mgorny@gentoo.org>2018-01-01 11:34:44 +0100
commitb276da8ae379f7eb0dcb9e9020bb37035db3376c (patch)
tree94758bfa8cd282e89b648d889a91ce783bf77364 /eclass
parenttmpfiles.eclass: Support using on non-Linux systems (diff)
downloadgentoo-b276da8ae379f7eb0dcb9e9020bb37035db3376c.tar.gz
gentoo-b276da8ae379f7eb0dcb9e9020bb37035db3376c.tar.bz2
gentoo-b276da8ae379f7eb0dcb9e9020bb37035db3376c.zip
tmpfiles.eclass: Explicit warn on ROOT != / to avoid breakage
Closes: https://github.com/gentoo/gentoo/pull/4526
Diffstat (limited to 'eclass')
-rw-r--r--eclass/tmpfiles.eclass13
1 files changed, 12 insertions, 1 deletions
diff --git a/eclass/tmpfiles.eclass b/eclass/tmpfiles.eclass
index 49c3cba6bdd2..6a461d4df859 100644
--- a/eclass/tmpfiles.eclass
+++ b/eclass/tmpfiles.eclass
@@ -110,7 +110,18 @@ tmpfiles_process() {
[[ ${#} -gt 0 ]] || die "${FUNCNAME}: Must specify at least one filename"
# Only process tmpfiles for the currently running system
- [[ ${ROOT} == / ]] || return 0
+ if [[ ${ROOT} != / ]]; then
+ ewarn "Warning: tmpfiles.d not processed on ROOT != /. If you do not use"
+ ewarn "a service manager supporting tmpfiles.d, you need to run"
+ ewarn "the following command after booting (or chroot-ing with all"
+ ewarn "appropriate filesystems mounted) into the ROOT:"
+ ewarn
+ ewarn " tmpfiles --create"
+ ewarn
+ ewarn "Failure to do so may result in missing runtime directories"
+ ewarn "and failures to run programs or start services."
+ return
+ fi
if type systemd-tmpfiles &> /dev/null; then
systemd-tmpfiles --create "$@"