From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from lists.gentoo.org (pigeon.gentoo.org [208.92.234.80]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits)) (No client certificate requested) by finch.gentoo.org (Postfix) with ESMTPS id 2B2DA158087 for ; Mon, 17 Jan 2022 14:44:08 +0000 (UTC) Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id 3555E2BC024; Mon, 17 Jan 2022 14:44:07 +0000 (UTC) Received: from smtp.gentoo.org (smtp.gentoo.org [IPv6:2001:470:ea4a:1:5054:ff:fec7:86e4]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits)) (No client certificate requested) by pigeon.gentoo.org (Postfix) with ESMTPS id 1D9182BC024 for ; Mon, 17 Jan 2022 14:44:07 +0000 (UTC) Received: (nullmailer pid 1292850 invoked by uid 1000); Mon, 17 Jan 2022 14:44:01 -0000 From: =?UTF-8?q?Andreas=20K=2E=20H=C3=BCttel?= To: gentoo-catalyst@lists.gentoo.org Cc: =?UTF-8?q?Andreas=20K=2E=20H=C3=BCttel?= Subject: [gentoo-catalyst] [PATCH 1/2] Call systemd-tmpfiles when the chroot is set up Date: Mon, 17 Jan 2022 15:43:54 +0100 Message-Id: <20220117144355.1292840-1-dilfridge@gentoo.org> X-Mailer: git-send-email 2.34.1 Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: List-Id: Gentoo Linux mail X-BeenThere: gentoo-catalyst@lists.gentoo.org Reply-to: gentoo-catalyst@lists.gentoo.org X-Auto-Response-Suppress: DR, RN, NRN, OOF, AutoReply MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Archives-Salt: ed70c801-7860-492f-88ae-08241d1e8120 X-Archives-Hash: 7704df623c65665b47ca1525b2399825 Signed-off-by: Andreas K. Hüttel --- 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