VirtualBox

Changeset 92114 in vbox for trunk/src


Ignore:
Timestamp:
Oct 27, 2021 8:21:09 PM (3 years ago)
Author:
vboxsync
Message:

Installer/darwin/VBoxKEXTs/VirtualBoxStartup.sh: Generalize the different Big Sur handling to Bug Sur and later

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/Installer/darwin/VBoxKEXTs/VirtualBoxStartup.sh

    r86306 r92114  
    7171    VBOXDRV="VBoxDrv"
    7272    VBOXUSB="VBoxUSB"
    73     MACOS_VERS=$(sw_vers -productVersion)
     73    MACOS_VERSION_MAJOR=$(sw_vers -productVersion | /usr/bin/sed -e 's/^\([0-9]*\).*$/\1/')
    7474
    7575    #
     
    9898    #
    9999    if [ $VBOX_RC -eq 0 ]; then
    100         if [[ ${MACOS_VERS} != 11.* ]]; then
     100        if [[ ${MACOS_VERSION_MAJOR} -lt 11 ]]; then
    101101            if kextstat -lb org.virtualbox.kext.VBoxDrv 2>&1 | grep -q org.virtualbox.kext.VBoxDrv; then
    102102                ConsoleMessage "Error: ${VBOXDRV}.kext is already loaded"
     
    143143    #
    144144    if [ $VBOX_RC -eq 0 ]; then
    145         if [[ ${MACOS_VERS} != 11.* ]]; then
     145        if [[ ${MACOS_VERSION_MAJOR} -lt 11 ]]; then
    146146            ConsoleMessage "Loading ${VBOXDRV}.kext"
    147147            if ! kextload "/Library/Application Support/VirtualBox/${VBOXDRV}.kext"; then
     
    221221    VBOXDRV="VBoxDrv"
    222222    VBOXUSB="VBoxUSB"
    223     MACOS_VERS=$(sw_vers -productVersion)
    224 
    225     if [[ ${MACOS_VERS} != 11.* ]]; then
     223    MACOS_VERSION_MAJOR=$(sw_vers -productVersion | /usr/bin/sed -e 's/^\([0-9]*\).*$/\1/')
     224
     225    if [[ ${MACOS_VERSION_MAJOR} -lt 11 ]]; then
    226226        if kextstat -lb org.virtualbox.kext.VBoxUSB 2>&1 | grep -q org.virtualbox.kext.VBoxUSB; then
    227227            ConsoleMessage "Unloading ${VBOXUSB}.kext"
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