From b294f79b5d3704e6da6fc51f31715bbc8e9d4c61 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Nicolas=20Mass=C3=A9?= Date: Thu, 4 Apr 2024 21:23:20 +0200 Subject: [PATCH] wip --- ansible/templates/kiosk.ks.j2 | 4 ++++ rpms/SPECS/kiosk-config.spec | 9 +++++++-- 2 files changed, 11 insertions(+), 2 deletions(-) diff --git a/ansible/templates/kiosk.ks.j2 b/ansible/templates/kiosk.ks.j2 index 7ffd110..7ddd157 100644 --- a/ansible/templates/kiosk.ks.j2 +++ b/ansible/templates/kiosk.ks.j2 @@ -58,6 +58,10 @@ cat > /etc/crio/openshift-pull-secret << 'EOF' EOF chmod 600 /etc/crio/openshift-pull-secret +# User creation in the ostree is now deprecated. Doing it in the Kickstart, then. +groupadd -r kiosk +useradd -r -N -g kiosk -d /home/kiosk -m kiosk + # Configure the firewall with the mandatory rules for MicroShift firewall-offline-cmd --zone=trusted --add-source=10.42.0.0/16 firewall-offline-cmd --zone=trusted --add-source=169.254.169.1 diff --git a/rpms/SPECS/kiosk-config.spec b/rpms/SPECS/kiosk-config.spec index 1682805..c565a84 100644 --- a/rpms/SPECS/kiosk-config.spec +++ b/rpms/SPECS/kiosk-config.spec @@ -72,8 +72,13 @@ install -m 0755 -D kiosk-app %{buildroot}/usr/bin/kiosk-app %attr(0755, root, root) /usr/bin/kiosk-app %pre -getent group kiosk >/dev/null 2>&1 || groupadd -r kiosk -getent passwd kiosk >/dev/null 2>&1 || useradd -r -N -g kiosk -d /home/kiosk -m kiosk +## +## HEADS UP !!! +## +## The kiosk user needs to be created in the kickstart now. +## +#getent group kiosk >/dev/null 2>&1 || groupadd -r kiosk +#getent passwd kiosk >/dev/null 2>&1 || useradd -r -N -g kiosk -d /home/kiosk -m kiosk %post %systemd_user_post com.redhat.Kiosk.SampleApp.service