Skip to content

Commit

Permalink
import from usability-misc package so libvirt group creation happens …
Browse files Browse the repository at this point in the history
…in time
  • Loading branch information
Patrick Schleizer committed May 13, 2019
1 parent 5f1be47 commit 316895a
Showing 1 changed file with 17 additions and 0 deletions.
17 changes: 17 additions & 0 deletions usr/lib/whonix-libvirt/install
Expand Up @@ -6,6 +6,23 @@
set -x
set -e

## {{ Taken from qemu-system-common.postinst.
# Add the kvm group unless it's already there
if ! getent group kvm >/dev/null; then
addgroup --quiet --system kvm || true
fi
## }} Taken from qemu-system-common.postinst.

## {{ Taken from libvirt-bin.postinst.
if ! getent group libvirt >/dev/null; then
addgroup --system libvirt
fi
## }} Taken from libvirt-bin.postinst.

## Existence of user "user" is not guaranteed at this point.
addgroup user kvm >/dev/null || true
addgroup user libvirt >/dev/null || true

## Doing the following in a temporary directory to avoid modified files should
## this be interrupted in the middle.
temp_dir="$(mktemp --directory)"
Expand Down

0 comments on commit 316895a

Please sign in to comment.