From mboxrd@z Thu Jan 1 00:00:00 1970 From: Stefan Schantl To: development@lists.ipfire.org Subject: [PATCH 3/3] Add systemd service file to launch bricklayer in install mode. Date: Fri, 24 Feb 2023 17:36:05 +0100 Message-ID: <20230224163605.90519-3-stefan.schantl@ipfire.org> In-Reply-To: <20230224163605.90519-1-stefan.schantl@ipfire.org> MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="===============2641782859252748264==" List-Id: --===============2641782859252748264== Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable This service file will launch bricklayer in install mode in case "install" has been given on the kernel command line. Signed-off-by: Stefan Schantl --- src/systemd/bricklayer.service.in | 30 ++++++++++++++++++++++++++++++ 1 file changed, 30 insertions(+) diff --git a/src/systemd/bricklayer.service.in b/src/systemd/bricklayer.servi= ce.in index e69de29..852fff1 100644 --- a/src/systemd/bricklayer.service.in +++ b/src/systemd/bricklayer.service.in @@ -0,0 +1,30 @@ +[Unit] +Description=3DLaunch bricklayer to install a new system +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.service +ConditionKernelCommandLine=3Dinstall + +[Service] +Type=3Doneshot +TimeoutSec=3D0 +RemainAfterExit=3Dyes +# tell systemd to stop logging to the console, to prevent it's messages +# with interfering with the Initial Setup TUI potentially running there +ExecStartPre=3D/bin/kill -SIGRTMIN+21 1 +ExecStartPre=3D-/bin/plymouth quit +ExecStart=3D@BINDIR@/bricklayer +# re-enable systemd console logging once Initial Setup 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 --===============2641782859252748264==--