Changeset 39239 in vbox for trunk/src/VBox/Additions/solaris/Installer/postinstall.sh
- Timestamp:
- Nov 8, 2011 1:15:11 PM (13 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Additions/solaris/Installer/postinstall.sh
r39237 r39239 77 77 } 78 78 79 abort()80 {81 echo 1>&2 "## $1"82 exit 183 }84 85 get_sysinfo()86 {87 BIN_PKG=`which pkg 2> /dev/null`88 if test -x "$BIN_PKG"; then89 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"; then91 # 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"; then95 # 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 else99 abort "Failed to parse the Solaris kernel version."100 fi101 else102 abort "Failed to detect the Solaris kernel version."103 fi104 else105 HOST_OS_MAJORVERSION=`uname -r`106 if test -z "$HOST_OS_MAJORVERSION" || test "$HOST_OS_MAJORVERSION" != "5.10"; then107 # S11 without 'pkg' ?? Something's wrong... bail.108 abort "Solaris $HOST_OS_MAJOR_VERSION detected without executable $BIN_PKG !? Confused."109 fi110 # 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 something112 # like "Generic_blah" for purely cosmetic purposes113 HOST_OS_MINORVERSION=`uname -v`114 fi115 echo "Detected Solaris $HOST_OS_MAJORVERSION version $HOST_OS_MINORVERSION"116 }117 118 79 solaris64dir="amd64" 119 80 solaris32dir="i386" … … 122 83 vboxadditions64_path=$vboxadditions_path/$solaris64dir 123 84 124 # get OS details125 get_sysinfo126 85 # get the current zone 127 86 currentzone=`zonename`
Note:
See TracChangeset
for help on using the changeset viewer.