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 3EA99158087 for ; Mon, 17 Jan 2022 14:43:47 +0000 (UTC) Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id 37C662BC00A; Mon, 17 Jan 2022 14:43:46 +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 812602BC00A for ; Mon, 17 Jan 2022 14:43:45 +0000 (UTC) Received: (nullmailer pid 1292817 invoked by uid 1000); Mon, 17 Jan 2022 14:43:40 -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 (stable branch) Date: Mon, 17 Jan 2022 15:43:29 +0100 Message-Id: <20220117144330.1292807-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: c96116b2-c31d-49ef-8e00-33b034cf058d X-Archives-Hash: 4f6461c5618f9aee038b2447d3875098 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 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