[PC-BSD Commits] r12388 - pbi/modules/emulators/virtualbox-ose/resources/bin

svn at pcbsd.org svn at pcbsd.org
Mon Aug 29 11:41:34 PDT 2011


Author: kris
Date: 2011-08-29 11:41:34 -0700 (Mon, 29 Aug 2011)
New Revision: 12388

Modified:
   pbi/modules/emulators/virtualbox-ose/resources/bin/VirtualBox-wrapper
Log:

Fix VirtualBox to set the default VirtualBox VM's directory to users instead of /root



Modified: pbi/modules/emulators/virtualbox-ose/resources/bin/VirtualBox-wrapper
===================================================================
--- pbi/modules/emulators/virtualbox-ose/resources/bin/VirtualBox-wrapper	2011-08-29 18:39:05 UTC (rev 12387)
+++ pbi/modules/emulators/virtualbox-ose/resources/bin/VirtualBox-wrapper	2011-08-29 18:41:34 UTC (rev 12388)
@@ -1,9 +1,18 @@
 #!/bin/sh
 
-PROGDIR=CHANGEME
+PROGDIR=/usr/pbi/virtualbox-amd64
 
-VBOX_USER_HOME="`cat /etc/passwd | grep ^${USER}: | cut -d ":" -f 6`/.VirtualBox"
+VBOX_USER_HOME="`cat /etc/passwd | grep ^${USER}: | cut -d ":" -f 6`"
+HOME="$VBOX_USER_HOME"
+VBOX_USER_HOME="$VBOX_USER_HOME/.VirtualBox"
+
+export HOME
 export VBOX_USER_HOME
 export LD_LIBRARY_PATH PATH
 
+# Set the default VM folder the first run
+if [ ! -e "${HOME}/.VirtualBox" ] ; then
+  ${PROGDIR}/bin/VBoxManage setproperty machinefolder "${HOME}/VirtualBox VMs"
+fi
+
 ${PROGDIR}/bin/VirtualBox $@



More information about the Commits mailing list