Changeset 58687 in vbox
- Timestamp:
- Nov 13, 2015 2:15:52 PM (9 years ago)
- svn:sync-xref-src-repo-rev:
- 104114
- Location:
- trunk/src/VBox/Installer/solaris
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Installer/solaris/checkinstall.sh
r58669 r58687 41 41 fi 42 42 $BIN_PKGINFO $BASEDIR_OPT "$1" >/dev/null 2>&1 43 if test $?-eq 0; then43 if test "$?" -eq 0; then 44 44 return 0 45 45 fi … … 56 56 # using "list" without "-a" only lists installed pkgs which is what we need 57 57 $BIN_PKG $BASEDIR_OPT list "$1" >/dev/null 2>&1 58 if test $?-eq 0; then58 if test "$?" -eq 0; then 59 59 return 0 60 60 fi … … 71 71 # using "list" without "-a" only lists installed pkgs which is what we need 72 72 $BIN_PKG $BASEDIR_OPT list "$1" >/dev/null 2>&1 73 if test $?-eq 0; then73 if test "$?" -eq 0; then 74 74 return 0 75 75 fi 76 76 $BIN_PKG $BASEDIR_OPT list "$2" >/dev/null 2>&1 77 if test $?-eq 0; then77 if test "$?" -eq 0; then 78 78 return 0 79 79 fi … … 110 110 # Nothing to check for non-global zones 111 111 currentzone=`zonename` 112 if test " $currentzone" != "global"; then112 if test "x$currentzone" != "xglobal"; then 113 113 exit 0 114 114 fi … … 147 147 fi 148 148 149 if test " $PKG_MISSING_IPS" != "" && test "$PKG_MISSING_SVR4" != ""; then149 if test "x$PKG_MISSING_IPS" != "x" && test "x$PKG_MISSING_SVR4" != "x"; then 150 150 if test ! -x "$BIN_PKG" && test ! -x "$BIN_PKGINFO"; then 151 151 errorprint "Missing or non-executable binaries: pkg ($BIN_PKG) and pkginfo ($BIN_PKGINFO)." -
trunk/src/VBox/Installer/solaris/preremove.sh
r56299 r58687 20 20 21 21 currentzone=`zonename` 22 if test " $currentzone" = "global"; then22 if test "x$currentzone" = "xglobal"; then 23 23 echo "Removing VirtualBox services and drivers..." 24 24 ${PKG_INSTALL_ROOT:=/}/opt/VirtualBox/vboxconfig.sh --preremove -
trunk/src/VBox/Installer/solaris/vboxconfig.sh
r58678 r58687 81 81 infoprint() 82 82 { 83 if test " $ISSILENT" != "$SILENTOP"; then83 if test "x$ISSILENT" != "x$SILENTOP"; then 84 84 echo 1>&2 "$1" 85 85 fi … … 88 88 subprint() 89 89 { 90 if test " $ISSILENT" != "$SILENTOP"; then90 if test "x$ISSILENT" != "x$SILENTOP"; then 91 91 echo 1>&2 " - $1" 92 92 fi … … 95 95 warnprint() 96 96 { 97 if test " $ISSILENT" != "$SILENTOP"; then97 if test "x$ISSILENT" != "x$SILENTOP"; then 98 98 echo 1>&2 " * Warning!! $1" 99 99 fi … … 275 275 # worth trying to bring more order to chaos as it's clear that the version numbering is subject to breakage 276 276 # as it has been seen in the past. 277 if test " $STR_KERN_MAJOR" = "5.12"; then277 if test "x$STR_KERN_MAJOR" = "x5.12"; then 278 278 HOST_OS_MAJORVERSION="12" 279 elif test " $STR_KERN_MAJOR" = "0.5.11" || test "$STR_KERN_MAJOR" = "5.11"; then279 elif test "x$STR_KERN_MAJOR" = "x0.5.11" || test "x$STR_KERN_MAJOR" = "x5.11"; then 280 280 HOST_OS_MAJORVERSION="11" 281 281 else … … 288 288 BRANCH_VERSION=$STR_KERN_MAJOR 289 289 HOST_OS_MAJORVERSION=`echo "$BRANCH_VERSION" | cut -f2 -d'-' | cut -f1,2 -d'.'` 290 if test " $HOST_OS_MAJORVERSION" = "5.12"; then290 if test "x$HOST_OS_MAJORVERSION" = "x5.12"; then 291 291 HOST_OS_MAJORVERSION="12" 292 292 HOST_OS_MINORVERSION=`echo "$BRANCH_VERSION" | cut -f2 -d'-' | cut -f6 -d'.'` … … 327 327 else 328 328 HOST_OS_MAJORVERSION=`uname -r` 329 if test -z "$HOST_OS_MAJORVERSION" || test " $HOST_OS_MAJORVERSION" != "5.10"; then329 if test -z "$HOST_OS_MAJORVERSION" || test "x$HOST_OS_MAJORVERSION" != "x5.10"; then 330 330 # S11 without 'pkg'?? Something's wrong... bail. 331 331 errorprint "Solaris $HOST_OS_MAJORVERSION detected without executable $BIN_PKG !? I are confused." … … 348 348 349 349 REMOTE_S10=`$BIN_PKGCHK -l -p /kernel/amd64/genunix $BASEDIR_PKGOPT 2> /dev/null | grep SUNWckr | tr -d ' \t'` 350 if test ! -z "$REMOTE_S10" && test " $REMOTE_S10" = "SUNWckr"; then350 if test ! -z "$REMOTE_S10" && test "x$REMOTE_S10" = "xSUNWckr"; then 351 351 HOST_OS_MAJORVERSION="10" 352 352 HOST_OS_MINORVERSION="" … … 365 365 { 366 366 currentzone=`zonename` 367 if test " $currentzone" != "global"; then367 if test "x$currentzone" != "xglobal"; then 368 368 errorprint "This script must be run from the global zone." 369 369 exit 1 … … 376 376 { 377 377 currentisa=`uname -i` 378 if test " $currentisa" = "i86xpv"; then378 if test "x$currentisa" = "xi86xpv"; then 379 379 errorprint "VirtualBox cannot run under xVM Dom0! Fatal Error, Aborting installation!" 380 380 exit 1 … … 387 387 { 388 388 cputype=`isainfo -k` 389 if test " $cputype" != "amd64" && test "$cputype" != "i386"; then389 if test "x$cputype" != "xamd64" && test "x$cputype" != "xi386"; then 390 390 errorprint "VirtualBox works only on i386/amd64 hosts, not $cputype" 391 391 exit 1 … … 459 459 460 460 if test -n "$modperm"; then 461 if test " $nullop" = "$NULLOP"; then461 if test "x$nullop" = "x$NULLOP"; then 462 462 $BIN_ADDDRV $BASEDIR_OPT -m"$modperm" $modname >/dev/null 2>&1 463 463 else … … 465 465 fi 466 466 else 467 if test " $nullop" = "$NULLOP"; then467 if test "x$nullop" = "x$NULLOP"; then 468 468 $BIN_ADDDRV $BASEDIR_OPT $modname >/dev/null 2>&1 469 469 else … … 472 472 fi 473 473 474 if test $?-ne 0; then474 if test "$?" -ne 0; then 475 475 subprint "Adding: $moddesc module ...FAILED!" 476 if test " $fatal" = "$FATALOP"; then476 if test "x$fatal" = "x$FATALOP"; then 477 477 exit 1 478 478 fi … … 499 499 if test "$?" -eq 0; then 500 500 UPDATEBOOTARCHIVE=1 501 if test " $ISIPS" != "$IPSOP"; then501 if test "x$ISIPS" != "x$IPSOP"; then 502 502 $BIN_REMDRV $BASEDIR_OPT $modname 503 503 else … … 510 510 else 511 511 subprint "Removing: $moddesc ...FAILED!" 512 if test " $fatal" = "$FATALOP"; then512 if test "x$fatal" = "x$FATALOP"; then 513 513 exit 1 514 514 fi … … 539 539 if test -n "$modid"; then 540 540 $BIN_MODUNLOAD -i $modid 541 if test $?-eq 0; then541 if test "$?" -eq 0; then 542 542 subprint "Unloaded: $moddesc module" 543 543 else … … 546 546 # Our automated tests are probably too quick... Fix properly later. 547 547 # 548 result= $?548 result="$?" 549 549 if test "$retry" -eq 1; then 550 550 cmax=15 … … 559 559 fi 560 560 $BIN_MODUNLOAD -i $modid 561 result= $?561 result="$?" 562 562 done 563 563 fi … … 565 565 if test "$result" -ne 0; then 566 566 subprint "Unloading: $moddesc module ...FAILED!" 567 if test " $fatal" = "$FATALOP"; then567 if test "x$fatal" = "x$FATALOP"; then 568 568 exit 1 569 569 fi … … 596 596 fatal=$3 597 597 $BIN_MODLOAD -p $modname 598 if test $?-eq 0; then598 if test "$?" -eq 0; then 599 599 return 0 600 600 else 601 601 subprint "Loading: $moddesc module ...FAILED!" 602 if test " $fatal" = "$FATALOP"; then602 if test "x$fatal" = "x$FATALOP"; then 603 603 exit 1 604 604 fi … … 659 659 if test "$REMOTEINST" -eq 0; then 660 660 /usr/sbin/devfsadm -i "$MOD_VBOXDRV" 661 if test $?-ne 0 || test ! -h "/dev/vboxdrv" || test ! -h "/dev/vboxdrvu" ; then661 if test "$?" -ne 0 || test ! -h "/dev/vboxdrv" || test ! -h "/dev/vboxdrvu" ; then 662 662 errorprint "Failed to create device link for $MOD_VBOXDRV." 663 663 exit 1 … … 713 713 fi 714 714 fi 715 if test " $try_vboxusb" = "yes"; then715 if test "x$try_vboxusb" = "xyes"; then 716 716 # Add a group "vboxuser" (8-character limit) for USB access. 717 717 # All users which need host USB-passthrough support will have to be added to this group. … … 731 731 if test "$REMOTEINST" -eq 0; then 732 732 /usr/sbin/devfsadm -i "$MOD_VBOXUSBMON" 733 if test $?-ne 0; then733 if test "$?" -ne 0; then 734 734 errorprint "Failed to create device link for $MOD_VBOXUSBMON." 735 735 exit 1 … … 900 900 if test "$?" -eq 1; then 901 901 subprint "Terminating: $procname ...FAILED!" 902 if test " $fatal" = "$FATALOP"; then902 if test "x$fatal" = "x$FATALOP"; then 903 903 exit 1 904 904 fi … … 926 926 927 927 $BIN_SVCS "$3" >/dev/null 2>&1 928 while test $?-ne 0;928 while test "$?" -ne 0; 929 929 do 930 930 sleep 1 … … 982 982 if test "$HOST_OS_MAJORVERSION" -gt 11 || (test "$HOST_OS_MAJORVERSION" -eq 11 && test "$HOST_OS_MINORVERSION" -gt 174); then 983 983 vanityname=`dladm show-phys -po link,device | grep vboxnet0 | cut -f1 -d':'` 984 if test $? -eq 0 && test ! -z "$vanityname" && test "$vanityname" != "vboxnet0"; then984 if test "$?" -eq 0 && test ! -z "$vanityname" && test "x$vanityname" != "xvboxnet0"; then 985 985 dladm rename-link "$vanityname" vboxnet0 986 if test $?-ne 0; then986 if test "$?" -ne 0; then 987 987 errorprint "Failed to rename vanity interface ($vanityname) to vboxnet0" 988 988 fi … … 1024 1024 sed -e '/#VirtualBox_SectionStart/,/#VirtualBox_SectionEnd/d' $nmaskfile > $nmaskbackupfile 1025 1025 1026 if test $recreatelink-eq 1; then1026 if test "$recreatelink" -eq 1; then 1027 1027 # Check after removing our settings if /etc/netmasks is identifcal to /etc/inet/netmasks 1028 1028 anydiff=`diff $nmaskbackupfile "$PKG_INSTALL_ROOT/etc/inet/netmasks"` … … 1036 1036 inst=0 1037 1037 networkn=56 1038 while test $inst-ne 1; do1038 while test "$inst" -ne 1; do 1039 1039 echo "192.168.$networkn.0 255.255.255.0" >> $nmaskbackupfile 1040 1040 inst=`expr $inst + 1` … … 1045 1045 1046 1046 # Recreate /etc/netmasks as a link if necessary 1047 if test $recreatelink-eq 1; then1047 if test "$recreatelink" -eq 1; then 1048 1048 cp -f "$PKG_INSTALL_ROOT/etc/netmasks" "$PKG_INSTALL_ROOT/etc/inet/netmasks" 1049 1049 ln -sf ./inet/netmasks "$PKG_INSTALL_ROOT/etc/netmasks" 1050 elif test $recreatelink-eq 2; then1050 elif test "$recreatelink" -eq 2; then 1051 1051 warnprint "/etc/netmasks is a symlink (to /etc/inet/netmasks) that older" 1052 1052 warnprint "VirtualBox installers incorrectly overwrote. Now the contents" … … 1073 1073 # use ipadm for Solaris 12 and newer 1074 1074 if test "$HOST_OS_MAJORVERSION" -ge 12; then 1075 while test $inst-ne $MOD_VBOXNET_INST; do1075 while test "$inst" -ne $MOD_VBOXNET_INST; do 1076 1076 vboxnetup=`$BIN_IPADM show-addr -p -o addrobj vboxnet$inst >/dev/null 2>&1` 1077 1077 if test "$?" -eq 0; then … … 1080 1080 if test "$?" -ne 0; then 1081 1081 errorprint "VirtualBox NetAdapter 'vboxnet$inst' couldn't be removed (probably in use)." 1082 if test " $fatal" = "$FATALOP"; then1082 if test "x$fatal" = "x$FATALOP"; then 1083 1083 exit 1 1084 1084 fi … … 1090 1090 else 1091 1091 inst=0 1092 while test $inst-ne $MOD_VBOXNET_INST; do1092 while test "$inst" -ne $MOD_VBOXNET_INST; do 1093 1093 vboxnetup=`$BIN_IFCONFIG vboxnet$inst >/dev/null 2>&1` 1094 1094 if test "$?" -eq 0; then … … 1096 1096 if test "$?" -ne 0; then 1097 1097 errorprint "VirtualBox NetAdapter 'vboxnet$inst' couldn't be unplumbed (probably in use)." 1098 if test " $fatal" = "$FATALOP"; then1098 if test "x$fatal" = "x$FATALOP"; then 1099 1099 exit 1 1100 1100 fi … … 1108 1108 if test "$?" -ne 0; then 1109 1109 errorprint "VirtualBox NetAdapter 'vboxnet$inst' IPv6 couldn't be unplumbed (probably in use)." 1110 if test " $fatal" = "$FATALOP"; then1110 if test "x$fatal" = "x$FATALOP"; then 1111 1111 exit 1 1112 1112 fi … … 1204 1204 inst=0 1205 1205 networkn=56 1206 while test $inst-ne 1; do1206 while test "$inst" -ne 1; do 1207 1207 echo "vboxnet$inst static 192.168.$networkn.1" >> $nwambackupfile 1208 1208 inst=`expr $inst + 1`
Note:
See TracChangeset
for help on using the changeset viewer.