VirtualBox

Ignore:
Timestamp:
Nov 8, 2011 1:15:11 PM (13 years ago)
Author:
vboxsync
Message:

Additions/solaris: Turns out we don't need to do version specific hacks, remove unused code.

File:
1 edited

Legend:

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

    r39237 r39239  
    7777}
    7878
    79 abort()
    80 {
    81     echo 1>&2 "## $1"
    82     exit 1
    83 }
    84 
    85 get_sysinfo()
    86 {
    87     BIN_PKG=`which pkg 2> /dev/null`
    88     if test -x "$BIN_PKG"; then
    89         PKGFMRI=`$BIN_PKG contents -H -t set -a name=pkg.fmri -o pkg.fmri pkg:/system/kernel 2> /dev/null`
    90         if test ! -z "$PKGFMRI"; then
    91             # The format is "pkg://solaris/system/[email protected],5.11-0.161:20110315T070332Z"
    92             #            or "pkg://solaris/system/[email protected],5.11-0.175.0.0.0.1.0:20111012T032837Z"
    93             STR_KERN=`echo "$PKGFMRI" | sed 's/^.*\@//;s/\:.*//;s/.*,//'`
    94             if test ! -z "$STR_KERN"; then
    95                 # The format is "5.11-0.161" or "5.11-0.175.0.0.0.1.0"
    96                 HOST_OS_MAJORVERSION=`echo "$STR_KERN" | cut -f1 -d'-'`
    97                 HOST_OS_MINORVERSION=`echo "$STR_KERN" | cut -f2 -d'-' | cut -f2 -d '.'`
    98             else
    99                 abort "Failed to parse the Solaris kernel version."
    100             fi       
    101         else
    102             abort "Failed to detect the Solaris kernel version."
    103         fi
    104     else
    105         HOST_OS_MAJORVERSION=`uname -r`
    106         if test -z "$HOST_OS_MAJORVERSION" || test "$HOST_OS_MAJORVERSION" != "5.10";  then
    107             # S11 without 'pkg' ?? Something's wrong... bail.
    108             abort "Solaris $HOST_OS_MAJOR_VERSION detected without executable $BIN_PKG !? Confused."
    109         fi
    110         # Use uname to verify it's S10.
    111         # Major version is S10, Minor version is no longer relevant (or used), use uname -v so it gets something
    112         # like "Generic_blah" for purely cosmetic purposes
    113         HOST_OS_MINORVERSION=`uname -v`
    114     fi
    115     echo "Detected Solaris $HOST_OS_MAJORVERSION version $HOST_OS_MINORVERSION"
    116 }
    117 
    11879solaris64dir="amd64"
    11980solaris32dir="i386"
     
    12283vboxadditions64_path=$vboxadditions_path/$solaris64dir
    12384
    124 # get OS details
    125 get_sysinfo
    12685# get the current zone
    12786currentzone=`zonename`
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