From mboxrd@z Thu Jan 1 00:00:00 1970 From: Stefan Schantl To: development@lists.ipfire.org Subject: [PATCH 2/3] Add systemd service file to launch bricklayer in first install mode. Date: Fri, 24 Feb 2023 17:36:04 +0100 Message-ID: <20230224163605.90519-2-stefan.schantl@ipfire.org> In-Reply-To: <20230224163605.90519-1-stefan.schantl@ipfire.org> MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="===============1796482475891776694==" List-Id: --===============1796482475891776694== Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable This service file will launch bricklayer in first-install mode in case the firstinstall flag on the filesystem is set. Signed-off-by: Stefan Schantl --- .../bricklayer-first-install.service.in | 30 +++++++++++++++++++ 1 file changed, 30 insertions(+) diff --git a/src/systemd/bricklayer-first-install.service.in b/src/systemd/br= icklayer-first-install.service.in index e69de29..2ba2dd5 100644 --- a/src/systemd/bricklayer-first-install.service.in +++ b/src/systemd/bricklayer-first-install.service.in @@ -0,0 +1,30 @@ +[Unit] +Description=3DLaunch bricklayer to configure pre-generated images +After=3Dplymouth-quit-wait.service +After=3Dsystemd-vconsole-setup.service systemd-user-sessions.service +# getty-pre.target is a pasive target, we need to request it before we can u= se it +Wants=3Dgetty-pre.target +# Prevent getty from running on any consoles before we are done +Before=3Dgetty-pre.target +Conflicts=3Dplymouth-quit-wait.service bricklayer-first-install.service +ConditionPathExists=3D/.firstinstall + +[Service] +Type=3Doneshot +TimeoutSec=3D0 +RemainAfterExit=3Dyes +# Tell systemd to stop logging to the console, to prevent it's messages +# with interfering with the TUI of bricklayer potentially running there +ExecStartPre=3D/bin/kill -SIGRTMIN+21 1 +ExecStartPre=3D-/bin/plymouth quit +ExecStart=3D@BINDIR@/bricklayer --first-install +# Re-enable systemd console logging once bricklayer is done +ExecStartPost=3D/bin/kill -SIGRTMIN+20 1 +TimeoutSec=3D0 +RemainAfterExit=3Dno +StandardInput=3Dtty +StandardOutput=3Dtty +StandardError=3Dtty + +[Install] +WantedBy=3Dmulti-user.target --=20 2.30.2 --===============1796482475891776694==--