aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rwxr-xr-xvbox18
1 files changed, 18 insertions, 0 deletions
diff --git a/vbox b/vbox
index 327a620..6b6935a 100755
--- a/vbox
+++ b/vbox
@@ -14,6 +14,11 @@ function usage {
exit 1
}
+# TODO
+# Execute commands inside a virtual machine
+#function vbox_exec {
+#}
+
# Build options
if [ ! -z "$VM" ]; then
if [ "$COMMAND" == "up" ]; then
@@ -29,6 +34,19 @@ if [ ! -z "$VM" ]; then
OPTIONS="execute --username vagrant --password vagrant --image /home/vagrant/apps/hydra/hydractl"
OPTIONS="$OPTIONS --verbose --wait-exit --wait-stdout --wait-stderr -- upgrade clean"
COMMAND="guestcontrol"
+ # TODO
+ #elif [ "$COMMAND" == "zerofree" ]; then
+ # vbox_exec $VM apt-get install zerofree
+ # vbox_exec $VM apt-get clean
+ # vbox_exec $VM telinit 1
+ # vbox_exec $VM mount -o remount,ro /
+ # vbox_exec $VM zerofree /dev/sda1
+ # vbox_exec $VM halt
+ # VBoxManage modifyhd --compact /var/cache/virtualbox/$box/$box.vdi
+ # exit
+ #elif [ "$COMMAND" == "zerofree" ]; then
+ # shift
+ # vbox_exec $*
else
usage
fi