From: Daan De Meyer Date: Fri, 7 Jun 2024 20:32:08 +0000 (+0200) Subject: mkosi: Replace sysusers.d with useradd for test user X-Git-Tag: v256~18^2~1 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=27cd8a61c150f17e48d614a8983ec34a53e98469;p=thirdparty%2Fsystemd.git mkosi: Replace sysusers.d with useradd for test user sysusers.d is not intended for regular users, so let's use useradd instead. --- diff --git a/mkosi.images/system/mkosi.extra/usr/lib/sysusers.d/testuser.conf b/mkosi.images/system/mkosi.extra/usr/lib/sysusers.d/testuser.conf deleted file mode 100644 index 9d65a0ee09b..00000000000 --- a/mkosi.images/system/mkosi.extra/usr/lib/sysusers.d/testuser.conf +++ /dev/null @@ -1 +0,0 @@ -u testuser 4711 "Test User" /home/testuser diff --git a/mkosi.images/system/mkosi.extra/usr/lib/tmpfiles.d/testuser.conf b/mkosi.images/system/mkosi.extra/usr/lib/tmpfiles.d/testuser.conf deleted file mode 100644 index 1b6ecb6f541..00000000000 --- a/mkosi.images/system/mkosi.extra/usr/lib/tmpfiles.d/testuser.conf +++ /dev/null @@ -1 +0,0 @@ -q /home/testuser 0700 4711 4711 diff --git a/mkosi.images/system/mkosi.postinst.chroot b/mkosi.images/system/mkosi.postinst.chroot index aaf4ac504e2..46868020f6a 100755 --- a/mkosi.images/system/mkosi.postinst.chroot +++ b/mkosi.images/system/mkosi.postinst.chroot @@ -3,6 +3,8 @@ set -e set -o nounset +useradd --uid 4711 --create-home --user-group testuser + if command -v authselect >/dev/null; then # authselect 1.5.0 renamed the minimal profile to the local profile without keeping backwards compat so # let's use the new name if it exists.