From: Michael Tremer Date: Tue, 2 Dec 2025 11:24:32 +0000 (+0000) Subject: libvirt: Create non-privileged users as system users X-Git-Tag: v2.29-core199~5 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=5195e0085ef2b320fe9a6312e5135a72f6c030bc;p=ipfire-2.x.git libvirt: Create non-privileged users as system users Signed-off-by: Michael Tremer --- diff --git a/lfs/libvirt b/lfs/libvirt index 659b42c586..6e3f1c8749 100644 --- a/lfs/libvirt +++ b/lfs/libvirt @@ -35,7 +35,7 @@ DIR_APP = $(DIR_SRC)/$(THISAPP) TARGET = $(DIR_INFO)/$(THISAPP) SUP_ARCH = x86_64 aarch64 PROG = libvirt -PAK_VER = 43 +PAK_VER = 44 DEPS = ebtables libpciaccess ovmf swtpm qemu diff --git a/src/paks/libvirt/install.sh b/src/paks/libvirt/install.sh index a11caa4341..288711ccb4 100644 --- a/src/paks/libvirt/install.sh +++ b/src/paks/libvirt/install.sh @@ -24,9 +24,12 @@ . /opt/pakfire/lib/functions.sh # creates a new user and group called libvirt-remote if they not exist -getent group libvirt-remote >/dev/null || groupadd libvirt-remote -getent passwd libvirt-remote >/dev/null || \ -useradd -m -g libvirt-remote -s /bin/bash "libvirt-remote" +if ! getent group libvirt-remote >/dev/null; then + groupadd -r libvirt-remote +fi +if ! getent passwd libvirt-remote >/dev/null; then + useradd -r -m -g libvirt-remote -s /bin/bash "libvirt-remote" +fi extract_files