Changeset 43418 in vbox
- Timestamp:
- Sep 24, 2012 2:35:38 PM (12 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Installer/solaris/vboxconfig.sh
r42491 r43418 237 237 if test ! -z "$PKGFMRI"; then 238 238 # 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" 239 240 # 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 245 264 else 246 errorprint "Failed to parse the Solaris kernel version."265 errorprint "Failed to parse the Solaris kernel package version." 247 266 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." 251 270 exit 1 252 271 fi … … 254 273 HOST_OS_MAJORVERSION=`uname -r` 255 274 if test -z "$HOST_OS_MAJORVERSION" || test "$HOST_OS_MAJORVERSION" != "5.10"; then 256 # S11 without 'pkg' 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." 258 277 exit 1 259 278 fi 279 HOST_OS_MAJORVERSION="10" 260 280 if test "$REMOTEINST" -eq 0; then 261 281 # Use uname to verify it's S10. … … 274 294 REMOTE_S10=`$BIN_PKGCHK -l -p /kernel/amd64/genunix $BASEDIR_PKGOPT 2> /dev/null | grep SUNWckr | tr -d ' \t'` 275 295 if test ! -z "$REMOTE_S10" && test "$REMOTE_S10" = "SUNWckr"; then 276 HOST_OS_MAJORVERSION=" 5.10"296 HOST_OS_MAJORVERSION="10" 277 297 HOST_OS_MINORVERSION="" 278 298 else … … 586 606 else 587 607 # 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"; then608 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 589 609 load_vboxflt 590 610 else … … 595 615 596 616 # Load VBoxUSBMon, VBoxUSB 597 if test -f "$DIR_CONF/vboxusbmon.conf" && test "$HOST_OS_MAJORVERSION" != " 5.10"; then598 # For VirtualBox 3.1 the new USB code requires Nevada > 123 599 if test "$HOST_OS_M INORVERSION" -gt 123; then617 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 600 620 # Add a group "vboxuser" (8-character limit) for USB access. 601 621 # All users which need host USB-passthrough support will have to be added to this group. … … 630 650 fi 631 651 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." 637 653 fi 638 654 fi … … 919 935 # plumb and configure vboxnet0 for non-remote installs 920 936 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; then937 # 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 923 939 vanityname=`dladm show-phys -po link,device | grep vboxnet0 | cut -f1 -d':'` 924 940 if test $? -eq 0 && test ! -z "$vanityname" && test "$vanityname" != "vboxnet0"; then
Note:
See TracChangeset
for help on using the changeset viewer.