VBox.sh revision be75da5235e6ed26c171a06f0a7d0e718bd7f60b
b3d2e587a32b409eca3ab23d1d1884d5199a8241kess# Oracle VM VirtualBox
b3d2e587a32b409eca3ab23d1d1884d5199a8241kess# Copyright (C) 2006-2010 Oracle Corporation
031b91a62d25106ae69d4693475c79618dd5e884fielding# This file is part of VirtualBox Open Source Edition (OSE), as
031b91a62d25106ae69d4693475c79618dd5e884fielding# available from http://www.virtualbox.org. This file is free software;
031b91a62d25106ae69d4693475c79618dd5e884fielding# you can redistribute it and/or modify it under the terms of the GNU
031b91a62d25106ae69d4693475c79618dd5e884fielding# General Public License (GPL) as published by the Free Software
031b91a62d25106ae69d4693475c79618dd5e884fielding# Foundation, in version 2 as it comes in the "COPYING" file of the
031b91a62d25106ae69d4693475c79618dd5e884fielding# VirtualBox OSE distribution. VirtualBox OSE is distributed in the
b3d2e587a32b409eca3ab23d1d1884d5199a8241kess# hope that it will be useful, but WITHOUT ANY WARRANTY of any kind.
b3d2e587a32b409eca3ab23d1d1884d5199a8241kessif [ ! -r "$CONFIG" ]; then
b3d2e587a32b409eca3ab23d1d1884d5199a8241kess echo "Could not find VirtualBox installation. Please reinstall."
b3d2e587a32b409eca3ab23d1d1884d5199a8241kess# Note: This script must not fail if the module was not successfully installed
b3d2e587a32b409eca3ab23d1d1884d5199a8241kess# because the user might not want to run a VM but only change VM params!
b3d2e587a32b409eca3ab23d1d1884d5199a8241kessWARNING: The vboxdrv kernel module is not loaded. Either there is no module
b3d2e587a32b409eca3ab23d1d1884d5199a8241kess available for the current kernel (`uname -r`) or it failed to
b3d2e587a32b409eca3ab23d1d1884d5199a8241kess load. Please recompile the kernel module and install it by
b3d2e587a32b409eca3ab23d1d1884d5199a8241kess sudo /etc/init.d/vboxdrv setup
b3d2e587a32b409eca3ab23d1d1884d5199a8241kess You will not be able to start VMs until this problem is fixed.
b3d2e587a32b409eca3ab23d1d1884d5199a8241kessWARNING: The character device /dev/vboxdrv does not exist. Try
b3d2e587a32b409eca3ab23d1d1884d5199a8241kess sudo /etc/init.d/vboxdrv restart
b3d2e587a32b409eca3ab23d1d1884d5199a8241kess and if that is not successful, try to re-install the package.
b3d2e587a32b409eca3ab23d1d1884d5199a8241kess You will not be able to start VMs until this problem is fixed.
8f7d6fc3a6ad107d66934d0d75ba4a5a095e1a3fndWARNING: The compilation of the vboxdrv.ko kernel module failed during the
8f7d6fc3a6ad107d66934d0d75ba4a5a095e1a3fnd installation for some reason. Starting a VM will not be possible.
8f7d6fc3a6ad107d66934d0d75ba4a5a095e1a3fnd Please consult the User Manual for build instructions.
8f7d6fc3a6ad107d66934d0d75ba4a5a095e1a3fndSERVER_PID=`ps -U \`whoami\` | grep VBoxSVC | awk '{ print $1 }'`
8f7d6fc3a6ad107d66934d0d75ba4a5a095e1a3fndif [ -z "$SERVER_PID" ]; then
8f7d6fc3a6ad107d66934d0d75ba4a5a095e1a3fnd # Server not running yet/anymore, cleanup socket path.
8f7d6fc3a6ad107d66934d0d75ba4a5a095e1a3fnd # See IPC_GetDefaultSocketPath()!
8f7d6fc3a6ad107d66934d0d75ba4a5a095e1a3fnd if [ -n "$LOGNAME" ]; then
4b5b56aec9f41dcf656de6534178fd353efbd43bkess if [ -n "$SERVER_PID" ]; then
4b5b56aec9f41dcf656de6534178fd353efbd43bkess exec "$INSTALL_DIR/VirtualBox" "$@"
b3d2e587a32b409eca3ab23d1d1884d5199a8241kess exec "$INSTALL_DIR/VBoxManage" "$@"
8f7d6fc3a6ad107d66934d0d75ba4a5a095e1a3fnd exec "$INSTALL_DIR/VBoxSDL" "$@"
b3d2e587a32b409eca3ab23d1d1884d5199a8241kess exec "$INSTALL_DIR/VBoxHeadless" "$@"
b3d2e587a32b409eca3ab23d1d1884d5199a8241kess exec "$INSTALL_DIR/vboxwebsrv" "$@"
cf02129aebf73dd0bdf369b172eb481ff76ac5f6colm echo "Unknown application - $APP"