1 |
Signed-off-by: Andreas K. Hüttel <dilfridge@g.o> |
2 |
--- |
3 |
targets/support/chroot-functions.sh | 9 +++++++++ |
4 |
1 file changed, 9 insertions(+) |
5 |
|
6 |
diff --git a/targets/support/chroot-functions.sh b/targets/support/chroot-functions.sh |
7 |
index d8472d46..51908195 100755 |
8 |
--- a/targets/support/chroot-functions.sh |
9 |
+++ b/targets/support/chroot-functions.sh |
10 |
@@ -227,6 +227,14 @@ update_env_settings(){ |
11 |
[ -f /tmp/envscript ] && source /tmp/envscript |
12 |
} |
13 |
|
14 |
+update_tmpfiles() { |
15 |
+ # if ROOT is unset, make sure it becomes "/" |
16 |
+ [ -x /bin/systemd-tmpfiles ] && \ |
17 |
+ echo "Setting up tmpfiles in ${ROOT:-/} ..." && \ |
18 |
+ /bin/systemd-tmpfiles --remove --create --boot "--root=${ROOT:-/}" \ |
19 |
+ --exclude-prefix=/dev --exclude-prefix=/proc --exclude-prefix=/sys |
20 |
+} |
21 |
+ |
22 |
die() { |
23 |
echo "$1" |
24 |
exit 1 |
25 |
@@ -290,6 +298,7 @@ C.UTF8 UTF-8 |
26 |
if [[ ${RUN_DEFAULT_FUNCS} != no ]] |
27 |
then |
28 |
update_env_settings |
29 |
+ update_tmpfiles |
30 |
setup_features |
31 |
show_debug |
32 |
fi |
33 |
-- |
34 |
2.34.1 |