public inbox for gentoo-catalyst@lists.gentoo.org
 help / color / mirror / Atom feed
* [gentoo-catalyst] [PATCH 1/2] Call systemd-tmpfiles when the chroot is set up (stable branch)
@ 2022-01-17 14:43 Andreas K. Hüttel
  2022-01-17 14:43 ` [gentoo-catalyst] [PATCH 2/2] Make a proper /run (and more) also in stage1 /tmp/stage1root Andreas K. Hüttel
  0 siblings, 1 reply; 3+ messages in thread
From: Andreas K. Hüttel @ 2022-01-17 14:43 UTC (permalink / raw
  To: gentoo-catalyst; +Cc: Andreas K. Hüttel

Signed-off-by: Andreas K. Hüttel <dilfridge@gentoo.org>
---
 targets/support/chroot-functions.sh | 9 +++++++++
 1 file changed, 9 insertions(+)

diff --git a/targets/support/chroot-functions.sh b/targets/support/chroot-functions.sh
index f3727d06..5bf7b1ca 100755
--- a/targets/support/chroot-functions.sh
+++ b/targets/support/chroot-functions.sh
@@ -242,6 +242,14 @@ update_env_settings(){
 	[ -f /tmp/envscript ] && source /tmp/envscript
 }
 
+update_tmpfiles() {
+	# if ROOT is unset, make sure it becomes "/"
+	[ -x /bin/systemd-tmpfiles ] && \
+		echo "Setting up tmpfiles in ${ROOT:-/} ..." && \
+		/bin/systemd-tmpfiles --remove --create --boot "--root=${ROOT:-/}" \
+			--exclude-prefix=/dev --exclude-prefix=/proc --exclude-prefix=/sys
+}
+
 die() {
 	echo "$1"
 	exit 1
@@ -324,6 +332,7 @@ run_default_funcs() {
 	if [ "${RUN_DEFAULT_FUNCS}" != "no" ]
 	then
 		update_env_settings
+		update_tmpfiles
 		setup_myfeatures
 		show_debug
 	fi
-- 
2.34.1



^ permalink raw reply related	[flat|nested] 3+ messages in thread
* [gentoo-catalyst] [PATCH 1/2] Call systemd-tmpfiles when the chroot is set up
@ 2022-01-17 14:43 Andreas K. Hüttel
  2022-01-17 14:43 ` [gentoo-catalyst] [PATCH 2/2] Make a proper /run (and more) also in stage1 /tmp/stage1root Andreas K. Hüttel
  0 siblings, 1 reply; 3+ messages in thread
From: Andreas K. Hüttel @ 2022-01-17 14:43 UTC (permalink / raw
  To: gentoo-catalyst; +Cc: Andreas K. Hüttel

Signed-off-by: Andreas K. Hüttel <dilfridge@gentoo.org>
---
 targets/support/chroot-functions.sh | 9 +++++++++
 1 file changed, 9 insertions(+)

diff --git a/targets/support/chroot-functions.sh b/targets/support/chroot-functions.sh
index d8472d46..51908195 100755
--- a/targets/support/chroot-functions.sh
+++ b/targets/support/chroot-functions.sh
@@ -227,6 +227,14 @@ update_env_settings(){
 	[ -f /tmp/envscript ] && source /tmp/envscript
 }
 
+update_tmpfiles() {
+	# if ROOT is unset, make sure it becomes "/"
+	[ -x /bin/systemd-tmpfiles ] && \
+		echo "Setting up tmpfiles in ${ROOT:-/} ..." && \
+		/bin/systemd-tmpfiles --remove --create --boot "--root=${ROOT:-/}" \
+			--exclude-prefix=/dev --exclude-prefix=/proc --exclude-prefix=/sys
+}
+
 die() {
 	echo "$1"
 	exit 1
@@ -290,6 +298,7 @@ C.UTF8 UTF-8
 if [[ ${RUN_DEFAULT_FUNCS} != no ]]
 then
 	update_env_settings
+	update_tmpfiles
 	setup_features
 	show_debug
 fi
-- 
2.34.1



^ permalink raw reply related	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2022-01-17 14:44 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2022-01-17 14:43 [gentoo-catalyst] [PATCH 1/2] Call systemd-tmpfiles when the chroot is set up (stable branch) Andreas K. Hüttel
2022-01-17 14:43 ` [gentoo-catalyst] [PATCH 2/2] Make a proper /run (and more) also in stage1 /tmp/stage1root Andreas K. Hüttel
  -- strict thread matches above, loose matches on Subject: below --
2022-01-17 14:43 [gentoo-catalyst] [PATCH 1/2] Call systemd-tmpfiles when the chroot is set up Andreas K. Hüttel
2022-01-17 14:43 ` [gentoo-catalyst] [PATCH 2/2] Make a proper /run (and more) also in stage1 /tmp/stage1root Andreas K. Hüttel

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox