Index: /trunk/src/VBox/Installer/solaris/checkinstall.sh
===================================================================
--- /trunk/src/VBox/Installer/solaris/checkinstall.sh	(revision 58686)
+++ /trunk/src/VBox/Installer/solaris/checkinstall.sh	(revision 58687)
@@ -41,5 +41,5 @@
     fi
     $BIN_PKGINFO $BASEDIR_OPT "$1" >/dev/null 2>&1
-    if test $? -eq 0; then
+    if test "$?" -eq 0; then
         return 0
     fi
@@ -56,5 +56,5 @@
     # using "list" without "-a" only lists installed pkgs which is what we need
     $BIN_PKG $BASEDIR_OPT list "$1" >/dev/null 2>&1
-    if test $? -eq 0; then
+    if test "$?" -eq 0; then
         return 0
     fi
@@ -71,9 +71,9 @@
     # using "list" without "-a" only lists installed pkgs which is what we need
     $BIN_PKG $BASEDIR_OPT list "$1" >/dev/null 2>&1
-    if test $? -eq 0; then
+    if test "$?" -eq 0; then
         return 0
     fi
     $BIN_PKG $BASEDIR_OPT list "$2" >/dev/null 2>&1
-    if test $? -eq 0; then
+    if test "$?" -eq 0; then
         return 0
     fi
@@ -110,5 +110,5 @@
 # Nothing to check for non-global zones
 currentzone=`zonename`
-if test "$currentzone" != "global"; then
+if test "x$currentzone" != "xglobal"; then
     exit 0
 fi
@@ -147,5 +147,5 @@
 fi
 
-if test "$PKG_MISSING_IPS" != "" && test "$PKG_MISSING_SVR4" != ""; then
+if test "x$PKG_MISSING_IPS" != "x" && test "x$PKG_MISSING_SVR4" != "x"; then
     if test ! -x "$BIN_PKG" && test ! -x "$BIN_PKGINFO"; then
         errorprint "Missing or non-executable binaries: pkg ($BIN_PKG) and pkginfo ($BIN_PKGINFO)."
Index: /trunk/src/VBox/Installer/solaris/preremove.sh
===================================================================
--- /trunk/src/VBox/Installer/solaris/preremove.sh	(revision 58686)
+++ /trunk/src/VBox/Installer/solaris/preremove.sh	(revision 58687)
@@ -20,5 +20,5 @@
 
 currentzone=`zonename`
-if test "$currentzone" = "global"; then
+if test "x$currentzone" = "xglobal"; then
     echo "Removing VirtualBox services and drivers..."
     ${PKG_INSTALL_ROOT:=/}/opt/VirtualBox/vboxconfig.sh --preremove
Index: /trunk/src/VBox/Installer/solaris/vboxconfig.sh
===================================================================
--- /trunk/src/VBox/Installer/solaris/vboxconfig.sh	(revision 58686)
+++ /trunk/src/VBox/Installer/solaris/vboxconfig.sh	(revision 58687)
@@ -81,5 +81,5 @@
 infoprint()
 {
-    if test "$ISSILENT" != "$SILENTOP"; then
+    if test "x$ISSILENT" != "x$SILENTOP"; then
         echo 1>&2 "$1"
     fi
@@ -88,5 +88,5 @@
 subprint()
 {
-    if test "$ISSILENT" != "$SILENTOP"; then
+    if test "x$ISSILENT" != "x$SILENTOP"; then
         echo 1>&2 "   - $1"
     fi
@@ -95,5 +95,5 @@
 warnprint()
 {
-    if test "$ISSILENT" != "$SILENTOP"; then
+    if test "x$ISSILENT" != "x$SILENTOP"; then
         echo 1>&2 "   * Warning!! $1"
     fi
@@ -275,7 +275,7 @@
                 # worth trying to bring more order to chaos as it's clear that the version numbering is subject to breakage
                 # as it has been seen in the past.
-                if test "$STR_KERN_MAJOR" = "5.12"; then
+                if test "x$STR_KERN_MAJOR" = "x5.12"; then
                     HOST_OS_MAJORVERSION="12"
-                elif test "$STR_KERN_MAJOR" = "0.5.11" || test "$STR_KERN_MAJOR" = "5.11"; then
+                elif test "x$STR_KERN_MAJOR" = "x0.5.11" || test "x$STR_KERN_MAJOR" = "x5.11"; then
                     HOST_OS_MAJORVERSION="11"
                 else
@@ -288,5 +288,5 @@
                     BRANCH_VERSION=$STR_KERN_MAJOR
                     HOST_OS_MAJORVERSION=`echo "$BRANCH_VERSION" | cut -f2 -d'-' | cut -f1,2 -d'.'`
-                    if test "$HOST_OS_MAJORVERSION" = "5.12"; then
+                    if test "x$HOST_OS_MAJORVERSION" = "x5.12"; then
                         HOST_OS_MAJORVERSION="12"
                         HOST_OS_MINORVERSION=`echo "$BRANCH_VERSION" | cut -f2 -d'-' | cut -f6 -d'.'`
@@ -327,5 +327,5 @@
     else
         HOST_OS_MAJORVERSION=`uname -r`
-        if test -z "$HOST_OS_MAJORVERSION" || test "$HOST_OS_MAJORVERSION" != "5.10";  then
+        if test -z "$HOST_OS_MAJORVERSION" || test "x$HOST_OS_MAJORVERSION" != "x5.10";  then
             # S11 without 'pkg'?? Something's wrong... bail.
             errorprint "Solaris $HOST_OS_MAJORVERSION detected without executable $BIN_PKG !? I are confused."
@@ -348,5 +348,5 @@
 
             REMOTE_S10=`$BIN_PKGCHK -l -p /kernel/amd64/genunix $BASEDIR_PKGOPT 2> /dev/null | grep SUNWckr | tr -d ' \t'`
-            if test ! -z "$REMOTE_S10" && test "$REMOTE_S10" = "SUNWckr"; then
+            if test ! -z "$REMOTE_S10" && test "x$REMOTE_S10" = "xSUNWckr"; then
                 HOST_OS_MAJORVERSION="10"
                 HOST_OS_MINORVERSION=""
@@ -365,5 +365,5 @@
 {
     currentzone=`zonename`
-    if test "$currentzone" != "global"; then
+    if test "x$currentzone" != "xglobal"; then
         errorprint "This script must be run from the global zone."
         exit 1
@@ -376,5 +376,5 @@
 {
     currentisa=`uname -i`
-    if test "$currentisa" = "i86xpv"; then
+    if test "x$currentisa" = "xi86xpv"; then
         errorprint "VirtualBox cannot run under xVM Dom0! Fatal Error, Aborting installation!"
         exit 1
@@ -387,5 +387,5 @@
 {
     cputype=`isainfo -k`
-    if test "$cputype" != "amd64" && test "$cputype" != "i386"; then
+    if test "x$cputype" != "xamd64" && test "x$cputype" != "xi386"; then
         errorprint "VirtualBox works only on i386/amd64 hosts, not $cputype"
         exit 1
@@ -459,5 +459,5 @@
 
     if test -n "$modperm"; then
-        if test "$nullop" = "$NULLOP"; then
+        if test "x$nullop" = "x$NULLOP"; then
             $BIN_ADDDRV $BASEDIR_OPT -m"$modperm" $modname  >/dev/null 2>&1
         else
@@ -465,5 +465,5 @@
         fi
     else
-        if test "$nullop" = "$NULLOP"; then
+        if test "x$nullop" = "x$NULLOP"; then
             $BIN_ADDDRV $BASEDIR_OPT $modname >/dev/null 2>&1
         else
@@ -472,7 +472,7 @@
     fi
 
-    if test $? -ne 0; then
+    if test "$?" -ne 0; then
         subprint "Adding: $moddesc module ...FAILED!"
-        if test "$fatal" = "$FATALOP"; then
+        if test "x$fatal" = "x$FATALOP"; then
             exit 1
         fi
@@ -499,5 +499,5 @@
     if test "$?" -eq 0; then
         UPDATEBOOTARCHIVE=1
-        if test "$ISIPS" != "$IPSOP"; then
+        if test "x$ISIPS" != "x$IPSOP"; then
             $BIN_REMDRV $BASEDIR_OPT $modname
         else
@@ -510,5 +510,5 @@
         else
             subprint "Removing: $moddesc  ...FAILED!"
-            if test "$fatal" = "$FATALOP"; then
+            if test "x$fatal" = "x$FATALOP"; then
                 exit 1
             fi
@@ -539,5 +539,5 @@
     if test -n "$modid"; then
         $BIN_MODUNLOAD -i $modid
-        if test $? -eq 0; then
+        if test "$?" -eq 0; then
             subprint "Unloaded: $moddesc module"
         else
@@ -546,5 +546,5 @@
             # Our automated tests are probably too quick... Fix properly later.
             #
-            result=$?
+            result="$?"
             if test "$retry" -eq 1; then
                 cmax=15
@@ -559,5 +559,5 @@
                     fi
                     $BIN_MODUNLOAD -i $modid
-                    result=$?
+                    result="$?"
                 done
             fi
@@ -565,5 +565,5 @@
             if test "$result" -ne 0; then
                 subprint "Unloading: $moddesc module ...FAILED!"
-                if test "$fatal" = "$FATALOP"; then
+                if test "x$fatal" = "x$FATALOP"; then
                     exit 1
                 fi
@@ -596,9 +596,9 @@
     fatal=$3
     $BIN_MODLOAD -p $modname
-    if test $? -eq 0; then
+    if test "$?" -eq 0; then
         return 0
     else
         subprint "Loading: $moddesc module ...FAILED!"
-        if test "$fatal" = "$FATALOP"; then
+        if test "x$fatal" = "x$FATALOP"; then
             exit 1
         fi
@@ -659,5 +659,5 @@
     if test "$REMOTEINST" -eq 0; then
         /usr/sbin/devfsadm -i "$MOD_VBOXDRV"
-        if test $? -ne 0 || test ! -h "/dev/vboxdrv" || test ! -h "/dev/vboxdrvu" ; then
+        if test "$?" -ne 0 || test ! -h "/dev/vboxdrv" || test ! -h "/dev/vboxdrvu" ; then
             errorprint "Failed to create device link for $MOD_VBOXDRV."
             exit 1
@@ -713,5 +713,5 @@
         fi
     fi
-    if test "$try_vboxusb" = "yes"; then
+    if test "x$try_vboxusb" = "xyes"; then
         # Add a group "vboxuser" (8-character limit) for USB access.
         # All users which need host USB-passthrough support will have to be added to this group.
@@ -731,5 +731,5 @@
         if test "$REMOTEINST" -eq 0; then
             /usr/sbin/devfsadm -i  "$MOD_VBOXUSBMON"
-            if test $? -ne 0; then
+            if test "$?" -ne 0; then
                 errorprint "Failed to create device link for $MOD_VBOXUSBMON."
                 exit 1
@@ -900,5 +900,5 @@
         if test "$?" -eq 1; then
             subprint "Terminating: $procname  ...FAILED!"
-            if test "$fatal" = "$FATALOP"; then
+            if test "x$fatal" = "x$FATALOP"; then
                 exit 1
             fi
@@ -926,5 +926,5 @@
 
     $BIN_SVCS "$3" >/dev/null 2>&1
-    while test $? -ne 0;
+    while test "$?" -ne 0;
     do
         sleep 1
@@ -982,7 +982,7 @@
     if test "$HOST_OS_MAJORVERSION" -gt 11 || (test "$HOST_OS_MAJORVERSION" -eq 11 && test "$HOST_OS_MINORVERSION" -gt 174); then
         vanityname=`dladm show-phys -po link,device | grep vboxnet0 | cut -f1 -d':'`
-        if test $? -eq 0 && test ! -z "$vanityname" && test "$vanityname" != "vboxnet0"; then
+        if test "$?" -eq 0 && test ! -z "$vanityname" && test "x$vanityname" != "xvboxnet0"; then
             dladm rename-link "$vanityname" vboxnet0
-            if test $? -ne 0; then
+            if test "$?" -ne 0; then
                 errorprint "Failed to rename vanity interface ($vanityname) to vboxnet0"
             fi
@@ -1024,5 +1024,5 @@
                 sed -e '/#VirtualBox_SectionStart/,/#VirtualBox_SectionEnd/d' $nmaskfile > $nmaskbackupfile
 
-                if test $recreatelink -eq 1; then
+                if test "$recreatelink" -eq 1; then
                     # Check after removing our settings if /etc/netmasks is identifcal to /etc/inet/netmasks
                     anydiff=`diff $nmaskbackupfile "$PKG_INSTALL_ROOT/etc/inet/netmasks"`
@@ -1036,5 +1036,5 @@
                 inst=0
                 networkn=56
-                while test $inst -ne 1; do
+                while test "$inst" -ne 1; do
                     echo "192.168.$networkn.0 255.255.255.0" >> $nmaskbackupfile
                     inst=`expr $inst + 1`
@@ -1045,8 +1045,8 @@
 
                 # Recreate /etc/netmasks as a link if necessary
-                if test $recreatelink -eq 1; then
+                if test "$recreatelink" -eq 1; then
                     cp -f "$PKG_INSTALL_ROOT/etc/netmasks" "$PKG_INSTALL_ROOT/etc/inet/netmasks"
                     ln -sf ./inet/netmasks "$PKG_INSTALL_ROOT/etc/netmasks"
-                elif test $recreatelink -eq 2; then
+                elif test "$recreatelink" -eq 2; then
                     warnprint "/etc/netmasks is a symlink (to /etc/inet/netmasks) that older"
                     warnprint "VirtualBox installers incorrectly overwrote. Now the contents"
@@ -1073,5 +1073,5 @@
     # use ipadm for Solaris 12 and newer
     if test "$HOST_OS_MAJORVERSION" -ge 12; then
-        while test $inst -ne $MOD_VBOXNET_INST; do
+        while test "$inst" -ne $MOD_VBOXNET_INST; do
             vboxnetup=`$BIN_IPADM show-addr -p -o addrobj vboxnet$inst >/dev/null 2>&1`
             if test "$?" -eq 0; then
@@ -1080,5 +1080,5 @@
                 if test "$?" -ne 0; then
                     errorprint "VirtualBox NetAdapter 'vboxnet$inst' couldn't be removed (probably in use)."
-                    if test "$fatal" = "$FATALOP"; then
+                    if test "x$fatal" = "x$FATALOP"; then
                         exit 1
                     fi
@@ -1090,5 +1090,5 @@
     else
         inst=0
-        while test $inst -ne $MOD_VBOXNET_INST; do
+        while test "$inst" -ne $MOD_VBOXNET_INST; do
             vboxnetup=`$BIN_IFCONFIG vboxnet$inst >/dev/null 2>&1`
             if test "$?" -eq 0; then
@@ -1096,5 +1096,5 @@
                 if test "$?" -ne 0; then
                     errorprint "VirtualBox NetAdapter 'vboxnet$inst' couldn't be unplumbed (probably in use)."
-                    if test "$fatal" = "$FATALOP"; then
+                    if test "x$fatal" = "x$FATALOP"; then
                         exit 1
                     fi
@@ -1108,5 +1108,5 @@
                 if test "$?" -ne 0; then
                     errorprint "VirtualBox NetAdapter 'vboxnet$inst' IPv6 couldn't be unplumbed (probably in use)."
-                    if test "$fatal" = "$FATALOP"; then
+                    if test "x$fatal" = "x$FATALOP"; then
                         exit 1
                     fi
@@ -1204,5 +1204,5 @@
                 inst=0
                 networkn=56
-                while test $inst -ne 1; do
+                while test "$inst" -ne 1; do
                     echo "vboxnet$inst	static 192.168.$networkn.1" >> $nwambackupfile
                     inst=`expr $inst + 1`
