VirtualBox

Changeset 39000 in vbox for trunk/src/VBox/Installer/solaris


Ignore:
Timestamp:
Oct 17, 2011 11:02:57 AM (13 years ago)
Author:
vboxsync
Message:

Solaris/Installer: fix detecting S11 minor version.

File:
1 edited

Legend:

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

    r38861 r39000  
    2222export LANG
    2323
    24 # S10 or OpenSoalris
     24# S10 or S11
    2525HOST_OS_MAJORVERSION=`uname -r`
    26 # Which OpenSolaris version (snv_xxx or oi_xxx)?
    27 HOST_OS_MINORVERSION=`uname -v | egrep 'snv|oi' | sed -e "s/snv_//" -e "s/oi_//" -e "s/[^0-9]//"`
     26# Which Solaris version (snv_xxx or oi_xxx or 11.x)?
     27HOST_OS_MINORVERSION=`uname -v | egrep 'snv|oi|11.' | sed -e "s/snv_//" -e "s/oi_//" -e "s/[^0-9.]//"`
    2828
    2929DIR_VBOXBASE="$PKG_INSTALL_ROOT/opt/VirtualBox"
     
    226226get_sysinfo()
    227227{
    228     if test "$REMOTEINST" -eq 1 || test -z "$HOST_OS_MINORVERSION" || test -z "$HOST_OS_MAJORVERSION"; then
    229         if test -f "$PKG_INSTALL_ROOT/etc/release"; then
    230             HOST_OS_MAJORVERSION=`cat "$PKG_INSTALL_ROOT/etc/release" | grep "Solaris 10"`
    231             if test -n "$HOST_OS_MAJORVERSION"; then
    232                 HOST_OS_MAJORVERSION="5.10"
     228    if test "$HOST_OS_MAJORVERSION" = "5.11" && test "$HOST_OS_MINORVERSION" = "11.0"; then
     229        HOST_OS_MINORVERSION="175"
     230    else
     231        # try find version for remote installs or if previous version parsing failed (empty strings), will minor will be empty
     232        # for S10 hosts
     233        if test "$REMOTEINST" -eq 1 || test -z "$HOST_OS_MINORVERSION" || test -z "$HOST_OS_MAJORVERSION"; then
     234            if test -f "$PKG_INSTALL_ROOT/etc/release"; then
     235                HOST_OS_MAJORVERSION=`cat "$PKG_INSTALL_ROOT/etc/release" | grep "Solaris 10"`
     236                if test -n "$HOST_OS_MAJORVERSION"; then
     237                    HOST_OS_MAJORVERSION="5.10"
     238                else
     239                    HOST_OS_MAJORVERSION=`cat "$PKG_INSTALL_ROOT/etc/release" | egrep "snv_|oi_"`
     240                    if test -n "$HOST_OS_MAJORVERSION"; then
     241                        HOST_OS_MAJORVERSION="5.11"
     242                    fi
     243                fi
     244                if test "$HOST_OS_MAJORVERSION" != "5.10"; then
     245                    HOST_OS_MINORVERSION=`cat "$PKG_INSTALL_ROOT/etc/release" | tr ' ' '\n' | egrep 'snv_|oi_' | sed -e "s/snv_//" -e "s/oi_//" -e "s/[^0-9]//"`
     246                else
     247                    HOST_OS_MINORVERSION=""
     248                fi
    233249            else
    234                 HOST_OS_MAJORVERSION=`cat "$PKG_INSTALL_ROOT/etc/release" | egrep "snv_|oi_"`
    235                 if test -n "$HOST_OS_MAJORVERSION"; then
    236                     HOST_OS_MAJORVERSION="5.11"
    237                 fi
    238             fi
    239             if test "$HOST_OS_MAJORVERSION" != "5.10"; then
    240                 HOST_OS_MINORVERSION=`cat "$PKG_INSTALL_ROOT/etc/release" | tr ' ' '\n' | egrep 'snv_|oi_' | sed -e "s/snv_//" -e "s/oi_//" -e "s/[^0-9]//"`
    241             else
     250                HOST_OS_MAJORVERSION=""
    242251                HOST_OS_MINORVERSION=""
    243252            fi
    244         else
    245             HOST_OS_MAJORVERSION=""
    246             HOST_OS_MINORVERSION=""
    247253        fi
    248254    fi
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