VirtualBox

Changeset 43418 in vbox


Ignore:
Timestamp:
Sep 24, 2012 2:35:38 PM (12 years ago)
Author:
vboxsync
Message:

Additions/solaris: Fix for Solaris 12 kernel package FMRI.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/Installer/solaris/vboxconfig.sh

    r42491 r43418  
    237237        if test ! -z "$PKGFMRI"; then
    238238            # The format is "pkg://solaris/system/[email protected],5.11-0.161:20110315T070332Z"
     239            #            or "pkg://solaris/system/[email protected],5.11-5.12.0.0.0.4.1:20120908T030246Z"
    239240            #            or "pkg://solaris/system/[email protected],5.11-0.175.0.0.0.1.0:20111012T032837Z"
    240             STR_KERN=`echo "$PKGFMRI" | sed 's/^.*\@//;s/\:.*//;s/.*,//'`
    241             if test ! -z "$STR_KERN"; then
    242                 # The format is "5.11-0.161" or "5.11-0.175.0.0.0.1.0"
    243                 HOST_OS_MAJORVERSION=`echo "$STR_KERN" | cut -f1 -d'-'`
    244                 HOST_OS_MINORVERSION=`echo "$STR_KERN" | cut -f2 -d'-' | cut -f2 -d '.'`
     241            STR_KERN_MAJOR=`echo "$PKGFMRI" | sed 's/^.*\@//;s/\,.*//'`
     242            if test ! -z "$STR_KERN_MAJOR"; then
     243                # The format is "0.5.11" or "5.12"
     244                # Let us just hardcode these for now, instead of trying to do things more generically. It's not
     245                # worth trying to bring more order to chaos as it's clear that the version numbering is subject to breakage
     246                # as it has been seen in the past.
     247                if test "$STR_KERN_MAJOR" = "5.12"; then
     248                    HOST_OS_MAJORVERSION="12"
     249                elif test "$STR_KERN_MAJOR" = "0.5.11" || test "$STR_KERN_MAJOR" = "5.11"; then
     250                    HOST_OS_MAJORVERSION="11"
     251                else
     252                    errorprint "Failed to parse the Solaris kernel major version."
     253                    exit 1
     254                fi
     255
     256                STR_KERN_MINOR=`echo "$PKGFMRI" | sed 's/^.*\@//;s/\:.*//;s/.*,//'`
     257                if test ! -z "$STR_KERN_MINOR"; then
     258                    # The format is "5.11-0.161" or "5.11-0.175.0.0.0.1.0" or "5.11-5.12.0.0.0.4.1"
     259                    HOST_OS_MINORVERSION=`echo "$STR_KERN_MINOR" | cut -f2 -d'-' | cut -f2 -d '.'`
     260                else
     261                    errorprint "Failed to parse the Solaris kernel minor version."
     262                    exit 1
     263                fi
    245264            else
    246                 errorprint "Failed to parse the Solaris kernel version."
     265                errorprint "Failed to parse the Solaris kernel package version."
    247266                exit 1
    248             fi       
    249         else
    250             errorprint "Failed to detect the Solaris kernel version."
     267            fi
     268        else
     269            errorprint "Failed to detect the Solaris kernel package FMRI."
    251270            exit 1
    252271        fi
     
    254273        HOST_OS_MAJORVERSION=`uname -r`
    255274        if test -z "$HOST_OS_MAJORVERSION" || test "$HOST_OS_MAJORVERSION" != "5.10";  then
    256             # S11 without 'pkg' ?? Something's wrong... bail.
    257             errorprint "Solaris $HOST_OS_MAJOR_VERSION detected without executable $BIN_PKG !? Confused."
     275            # S11 without 'pkg'?? Something's wrong... bail.
     276            errorprint "Solaris $HOST_OS_MAJOR_VERSION detected without executable $BIN_PKG !? I are confused."
    258277            exit 1
    259278        fi
     279        HOST_OS_MAJORVERSION="10"
    260280        if test "$REMOTEINST" -eq 0; then
    261281            # Use uname to verify it's S10.
     
    274294            REMOTE_S10=`$BIN_PKGCHK -l -p /kernel/amd64/genunix $BASEDIR_PKGOPT 2> /dev/null | grep SUNWckr | tr -d ' \t'`
    275295            if test ! -z "$REMOTE_S10" && test "$REMOTE_S10" = "SUNWckr"; then
    276                 HOST_OS_MAJORVERSION="5.10"
     296                HOST_OS_MAJORVERSION="10"
    277297                HOST_OS_MINORVERSION=""
    278298            else
     
    586606    else
    587607        # If host is S10 or S11 (< snv_159) or vboxbow isn't shipped, then load vboxflt
    588         if test "$HOST_OS_MAJORVERSION" = "5.10" || test "$HOST_OS_MINORVERSION" -lt 159 || test ! -f "$DIR_CONF/vboxbow.conf"; then
     608        if test "$HOST_OS_MAJORVERSION" -eq 10 || (test "$HOST_OS_MAJORVERSION" -eq 11 && test "$HOST_OS_MINORVERSION" -lt 159) || test ! -f "$DIR_CONF/vboxbow.conf"; then
    589609            load_vboxflt
    590610        else
     
    595615
    596616    # Load VBoxUSBMon, VBoxUSB
    597     if test -f "$DIR_CONF/vboxusbmon.conf" && test "$HOST_OS_MAJORVERSION" != "5.10"; then
    598         # For VirtualBox 3.1 the new USB code requires Nevada > 123
    599         if test "$HOST_OS_MINORVERSION" -gt 123; then
     617    if test -f "$DIR_CONF/vboxusbmon.conf" && test "$HOST_OS_MAJORVERSION" != "10"; then
     618        # For VirtualBox 3.1 the new USB code requires Nevada > 123 i.e. S12+ or S11 b124+
     619        if test "$HOST_OS_MAJORVERSION" -gt 11 || (test "$HOST_OS_MAJORVERSION" -eq 11 && test "$HOST_OS_MINORVERSION" -gt 123); then
    600620            # Add a group "vboxuser" (8-character limit) for USB access.
    601621            # All users which need host USB-passthrough support will have to be added to this group.
     
    630650            fi
    631651        else
    632             if test -n "$HOST_OS_MINORVERSION"; then
    633                 warnprint "Solaris 5.11 build 124 or higher required for USB support. Skipped installing USB support."
    634             else
    635                 warnprint "Failed to determine Solaris 5.11 snv version. Skipped installing USB support."
    636             fi
     652            warnprint "Solaris 11 build 124 or higher required for USB support. Skipped installing USB support."
    637653        fi
    638654    fi
     
    919935            # plumb and configure vboxnet0 for non-remote installs
    920936            if test "$REMOTEINST" -eq 0; then
    921                 # S11 175a renames vboxnet0 as 'netX', undo this and rename it back
    922                 if test "$HOST_OS_MAJORVERSION" = "5.11" && test "$HOST_OS_MINORVERSION" -gt 174; then
     937                # S11 175a renames vboxnet0 as 'netX', undo this and rename it back (S12+ or S11 b175+)
     938                if test "$HOST_OS_MAJORVERSION" -gt 11 || (test "$HOST_OS_MAJORVERSION" -eq 11 && test "$HOST_OS_MINORVERSION" -gt 174); then
    923939                    vanityname=`dladm show-phys -po link,device | grep vboxnet0 | cut -f1 -d':'`
    924940                    if test $? -eq 0 && test ! -z "$vanityname" && test "$vanityname" != "vboxnet0"; then
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