VirtualBox

Changeset 61827 in vbox


Ignore:
Timestamp:
Jun 22, 2016 6:36:31 PM (9 years ago)
Author:
vboxsync
svn:sync-xref-src-repo-rev:
108234
Message:

bugref:8051: Installers: unify Linux host installers as far as possible: revert r103461: check the version and support driver version of currently installed kernel modules. We can get the same result for normal users with simpler code by always deleting old modules during installation. Developers can deal with making sure the right version is loaded.

File:
1 edited

Legend:

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

    r59883 r61827  
    7070    DEVICE_MODE=0660
    7171fi
    72 VERSION=`cat "${MODULE_SRC}/vboxdrv/version-generated.h" \
    73        | sed -n 's/#define\s*VBOX_VERSION_STRING\s*"\(.*\)"/\1/p'`
    74 IOC_VERSION=`cat "${MODULE_SRC}/vboxdrv/SUPDrvIOC.h" \
    75            | sed -n 's/#define\s*SUPDRV_IOC_VERSION\s*\(.*\)/\1/p'`
    76 MODINFO_VERSION=`modinfo vboxdrv 2>/dev/null | grep "^version:"`
    77 if expr "${MODINFO_VERSION}" : ".*${IOC_VERSION}" > /dev/null; then
    78     MODULE_BUILT=yes
    79 else
    80     MODULE_BUILT=
    81 fi
    8272
    8373[ -r /etc/default/virtualbox ] && . /etc/default/virtualbox
     
    115105    lsmod | grep -q "$1[^_-]"
    116106}
    117 
    118 test -z "${MODINFO_VERSION}" || expr "${MODINFO_VERSION}" : ".*${VERSION}" > /dev/null || \
    119     failure "Different version of VirtualBox services running. Please uninstall and try again"
    120107
    121108## Output the vboxdrv part of our udev rule.  This is redirected to the right file.
     
    245232start()
    246233{
    247     if test -z "${MODULE_BUILT}"; then
    248         test -z "${MODINFO_VERSION}" || stop || \
    249             failure "Cannot stop incompatible services version"
    250         setup
    251     fi
    252234    begin_msg "Starting VirtualBox services" console
    253235    # Create udev rule and USB device nodes.
     
    262244    fi
    263245    if ! running vboxdrv; then
    264         rm -f $DEVICE || failure "Cannot remove $DEVICE"
    265         $MODPROBE vboxdrv > /dev/null 2>&1 || \
    266             failure "modprobe vboxdrv failed. Please use 'dmesg' to find out why"
     246        if ! rm -f $DEVICE; then
     247            failure "Cannot remove $DEVICE"
     248        fi
     249        if ! $MODPROBE vboxdrv > /dev/null 2>&1; then
     250            setup
     251            if ! $MODPROBE vboxdrv > /dev/null 2>&1; then
     252                failure "modprobe vboxdrv failed. Please use 'dmesg' to find out why"
     253            fi
     254        fi
    267255        sleep .2
    268256    fi
Note: See TracChangeset for help on using the changeset viewer.

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