aboutsummaryrefslogtreecommitdiffstats
path: root/vagrant
diff options
context:
space:
mode:
authorVictor Morales <victor.morales@intel.com>2019-02-27 05:59:02 +0000
committerGerrit Code Review <gerrit@onap.org>2019-02-27 05:59:02 +0000
commit3fca6268234bd6d1ce749e8393e39cfd4a365003 (patch)
tree006df589c2fd12c2df85936e14fcddbb9f0b0b16 /vagrant
parent70650063048900b4396a65203a7624d435cb9741 (diff)
parent1a7ec9a17e82481b2b6b527988c8c2ba8aa70d1b (diff)
Merge "Fix setup.sh sudo permissions"
Diffstat (limited to 'vagrant')
-rwxr-xr-xvagrant/setup.sh20
1 files changed, 12 insertions, 8 deletions
diff --git a/vagrant/setup.sh b/vagrant/setup.sh
index a135ea96..0fb1b0d6 100755
--- a/vagrant/setup.sh
+++ b/vagrant/setup.sh
@@ -159,20 +159,20 @@ if [[ $vendor_id == *GenuineIntel* ]]; then
kvm_ok=$(cat /sys/module/kvm_intel/parameters/nested)
if [[ $kvm_ok == 'N' ]]; then
echo "Enable Intel Nested-Virtualization"
- rmmod kvm-intel
- echo 'options kvm-intel nested=y' >> /etc/modprobe.d/dist.conf
- modprobe kvm-intel
+ sudo rmmod kvm-intel
+ echo 'options kvm-intel nested=y' | sudo tee --append /etc/modprobe.d/dist.conf
+ sudo modprobe kvm-intel
fi
else
kvm_ok=$(cat /sys/module/kvm_amd/parameters/nested)
if [[ $kvm_ok == '0' ]]; then
echo "Enable AMD Nested-Virtualization"
- rmmod kvm-amd
- sh -c "echo 'options kvm-amd nested=1' >> /etc/modprobe.d/dist.conf"
- modprobe kvm-amd
+ sudo rmmod kvm-amd
+ echo 'options kvm-amd nested=1' | sudo tee --append /etc/modprobe.d/dist.conf
+ sudo modprobe kvm-amd
fi
fi
-modprobe vhost_net
+sudo modprobe vhost_net
${INSTALLER_CMD} ${packages[@]}
if ! which pip; then
@@ -193,5 +193,9 @@ if [ $VAGRANT_DEFAULT_PROVIDER == libvirt ]; then
sudo systemctl enable rpc-statd
sudo systemctl start rpc-statd
- kvm-ok
+ case ${ID,,} in
+ ubuntu|debian)
+ kvm-ok
+ ;;
+ esac
fi