summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMichael S. Pedersen <michaelx.pedersen@intel.com>2020-10-15 10:31:04 +0000
committerGeorg Kunz <georg.kunz@ericsson.com>2020-10-21 15:06:29 +0000
commit86544f7980c95916fd828bc8bdf4df903d4c720d (patch)
treef31030691261409963f31056fc8e95d4bf2ba8ba
parent84f092e7961684bc9125aa7740c56ceb6811798c (diff)
Update check of libvirt(d) group
Current check assumes whitespaces on either side of group name. This patch removes that assumption Signed-off-by: Michael S. Pedersen <michaelx.pedersen@intel.com> Change-Id: I4802420530be05831b8611b812c9866055cac714 Reviewed-on: https://gerrit.opnfv.org/gerrit/c/kuberef/+/71257 Tested-by: jenkins-ci <jenkins-opnfv-ci@opnfv.org> Reviewed-by: Victor Morales <chipahuac@hotmail.com> Reviewed-by: Georg Kunz <georg.kunz@ericsson.com>
-rwxr-xr-xfunctions.sh2
1 files changed, 1 insertions, 1 deletions
diff --git a/functions.sh b/functions.sh
index f0e1213..26db3c6 100755
--- a/functions.sh
+++ b/functions.sh
@@ -74,7 +74,7 @@ check_prerequisites() {
if [ "${ID,,}" == "ubuntu" ] && [ "$VERSION_ID" == "16.04" ]; then
libvirt_group+="d"
fi
- if ! groups | grep " $libvirt_group "; then
+ if ! groups | grep "$libvirt_group"; then
echo "ERROR : $(id -nu) user doesn't belong to $libvirt_group group."
exit 1
fi