Skip to content
Snippets Groups Projects
Commit f59b09cc authored by Guido Günther's avatar Guido Günther
Browse files

Only add libvirt-qemu user to libvirt-qemu group once

when the group gets created
parent ab5c1091
No related branches found
No related tags found
No related merge requests found
......@@ -23,13 +23,10 @@ add_users_groups()
addgroup --system libvirt
fi
# user and group libvirt runs qemu/kvm instances with
if ! getent group kvm >/dev/null; then
addgroup --quiet --system kvm
fi
if ! getent group libvirt-qemu >/dev/null; then
addgroup --quiet --system libvirt-qemu
fi
# user and group libvirt runs qemu/kvm instances with
if ! getent passwd libvirt-qemu >/dev/null; then
adduser --quiet \
--system \
......@@ -42,7 +39,10 @@ add_users_groups()
-gecos "Libvirt Qemu" \
libvirt-qemu
fi
adduser libvirt-qemu libvirt-qemu
if ! getent group libvirt-qemu >/dev/null; then
addgroup --quiet --system libvirt-qemu
adduser libvirt-qemu libvirt-qemu
fi
}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment