From b41980bacfab411a8c7dbc28529a91f731c4dcfc Mon Sep 17 00:00:00 2001 From: Victor Morales Date: Wed, 21 Mar 2018 09:07:40 -0700 Subject: Fix libvirt group name The libvirt group name can differ for every distro. This change fixes this difference on Ubuntu distributions. Change-Id: Id69d10cbf23249e36d5b3c0a0b2e2e2bd3dc44dd Signed-off-by: Victor Morales Issue-ID: INT-370 --- tools/setup.sh | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/tools/setup.sh b/tools/setup.sh index fe3a3fc..acf71d9 100755 --- a/tools/setup.sh +++ b/tools/setup.sh @@ -40,6 +40,7 @@ case $provider in esac source /etc/os-release || source /usr/lib/os-release +declare -r libvirt_group="libvirt" packages=() case ${ID,,} in *suse) @@ -74,6 +75,7 @@ case ${ID,,} in ;; ubuntu|debian) + libvirt_group="libvirtd" INSTALLER_CMD="sudo -H -E apt-get -y -q=3 install" # Vagrant installation @@ -129,5 +131,5 @@ esac ${INSTALLER_CMD} ${packages[@]} if [ $VAGRANT_DEFAULT_PROVIDER == libvirt ]; then vagrant plugin install vagrant-libvirt - sudo usermod -a -G libvirt $USER + sudo usermod -a -G $libvirt_group $USER fi -- cgit