VirtualBox

Changeset 58256 in vbox for trunk/src


Ignore:
Timestamp:
Oct 15, 2015 6:18:21 AM (9 years ago)
Author:
vboxsync
Message:

Installer/linux (host): change vboxdrv.sh so that it can be called from the build folder without installation.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/Installer/linux/vboxdrv.sh

    r58253 r58256  
    3232MODPROBE=/sbin/modprobe
    3333SCRIPTNAME=vboxdrv
     34# This is GNU-specific, sorry Solaris.  It fails on directories ending in '\n'.
     35SCRIPT_DIR="$(dirname $(readlink -f -- "${0}"))"
    3436
    3537if $MODPROBE -c | grep -q '^allow_unsupported_modules  *0'; then
     
    4244export USER=$USERNAME
    4345
    44 if [ -n "$INSTALL_DIR" ]; then
    45     MODULE_SRC="$INSTALL_DIR/src/vboxhost"
    46 else
     46if test -n "${INSTALL_DIR}" && test -x "${INSTALL_DIR}/VirtualBox"; then
     47    MODULE_SRC="${INSTALL_DIR}/src/vboxhost"
     48elif test -x /usr/lib/virtualbox/VirtualBox; then
    4749    INSTALL_DIR=/usr/lib/virtualbox
    4850    MODULE_SRC="/usr/share/virtualbox/src/vboxhost"
     51elif test -x "${SCRIPT_DIR}/VirtualBox"; then
     52    # Executing from the build directory
     53    INSTALL_DIR="${SCRIPT_DIR}"
     54    MODULE_SRC="${INSTALL_DIR}/src"
     55else
     56    # Silently exit if the package was uninstalled but not purged.
     57    # Applies to Debian packages only (but shouldn't hurt elsewhere)
     58    exit 0
    4959fi
    50     VIRTUALBOX="$INSTALL_DIR/VirtualBox"
    51     VBOXMANAGE="$INSTALL_DIR/VBoxManage"
    52 BUILDINTMP="$MODULE_SRC/build_in_tmp"
     60VIRTUALBOX="${INSTALL_DIR}/VirtualBox"
     61VBOXMANAGE="${INSTALL_DIR}/VBoxManage"
     62BUILDINTMP="${MODULE_SRC}/build_in_tmp"
    5363if test -u "${VIRTUALBOX}"; then
    5464    GROUP=root
     
    5868    DEVICE_MODE=0660
    5969fi
    60 
    61 # silently exit if the package was uninstalled but not purged,
    62 # applies to Debian packages only (but shouldn't hurt elsewhere)
    63 [ ! -f /etc/debian_release -o -x $VBOXMANAGE -a -x $BUILDINTMP ] || exit 0
    6470
    6571[ -r /etc/default/virtualbox ] && . /etc/default/virtualbox
Note: See TracChangeset for help on using the changeset viewer.

© 2024 Oracle Support Privacy / Do Not Sell My Info Terms of Use Trademark Policy Automated Access Etiquette