VOL-234. This update fixes issues seen with unresolved symbolic links
in the voltha tree when building and using the installer. There are
also updates to the documentation based on feedback receive from
multiple parties.
Change-Id: I21c7920cd52c42c7d5f4b48e064eafd04dd52203
diff --git a/install/BuildVoltha.sh b/install/BuildVoltha.sh
index 8c3af94..7a08577 100755
--- a/install/BuildVoltha.sh
+++ b/install/BuildVoltha.sh
@@ -6,11 +6,34 @@
# Voltha directory
cd ..
+# Blow away the settings file, we're going to set all the settings below
+rm -f settings.vagrant.yaml
+
# Rename voltha for multi-user support
-sed -i -e '/server_name/s/.*/server_name: "voltha'${uId}'"/' settings.vagrant.yaml
-# Build voltha in test mode
+echo "---" > settings.vagrant.yaml
+echo "# The name to use for the server" >> settings.vagrant.yaml
+echo 'server_name: "voltha'${uId}'"' >> settings.vagrant.yaml
+# Make sure that we're using KVM and not virtualbox
+echo '# Use KVM as the VM provider' >> settings.vagrant.yaml
+echo 'vProvider: "KVM"' >> settings.vagrant.yaml
+echo '# Use virtualbox as the VM provider' >> settings.vagrant.yaml
+echo '#vProvider: "virtualbox"' >> settings.vagrant.yaml
+# Build voltha in the specified mode if any
if [ $# -eq 1 -a "$1" == "test" ]; then
- sed -i -e '/test_mode/s/.*/test_mode: "true"/' settings.vagrant.yaml
+ echo '# This determines if test mode is active' >> settings.vagrant.yaml
+ echo 'testMode: "true"' >> settings.vagrant.yaml
+ echo '# This determines if installer mode is active' >> settings.vagrant.yaml
+ echo 'installMode: "false"' >> settings.vagrant.yaml
+elif [ $# -eq 1 -a "$1" == "install" ]; then
+ echo '# This determines if installer mode is active' >> settings.vagrant.yaml
+ echo 'installMode: "true"' >> settings.vagrant.yaml
+ echo '# This determines if test mode is active' >> settings.vagrant.yaml
+ echo 'testMode: "false"' >> settings.vagrant.yaml
+else
+ echo '# This determines if installer mode is active' >> settings.vagrant.yaml
+ echo 'installMode: "false"' >> settings.vagrant.yaml
+ echo '# This determines if test mode is active' >> settings.vagrant.yaml
+ echo 'testMode: "false"' >> settings.vagrant.yaml
fi
# Destroy the VM if it's running