Index: /trunk/src/VBox/Installer/solaris/vboxconfig.sh
===================================================================
--- /trunk/src/VBox/Installer/solaris/vboxconfig.sh	(revision 50786)
+++ /trunk/src/VBox/Installer/solaris/vboxconfig.sh	(revision 50787)
@@ -47,4 +47,5 @@
 BIN_ID=/usr/bin/id
 BIN_PKILL=/usr/bin/pkill
+BIN_PGREP=/usr/bin/pgrep
 
 # "vboxdrv" is also used in sed lines here (change those as well if it ever changes)
@@ -203,4 +204,8 @@
     if test ! -x "$BIN_PKILL"; then
         BIN_PKILL=`find_bin_path "$BIN_PKILL"`
+    fi
+
+    if test ! -x "$BIN_PGREP"; then
+        BIN_PGREP=`find_bin_path "$BIN_PGREP"`
     fi
 }
@@ -837,7 +842,7 @@
     fi
 
-    procname=$1
-    procpid=`ps -eo pid,fname | grep $procname | grep -v grep | awk '{ print $1 }'`
-    if test ! -z "$procpid" && test "$procpid" -ge 0; then
+    procname="$1"
+    $BIN_PGREP "$procname" > /dev/null 2>&1
+    if test "$?" -eq 0; then
         return 1
     fi
@@ -855,12 +860,11 @@
     fi
 
-    # @todo use is_process_running()
-    procname=$1
-    procpid=`ps -eo pid,fname | grep $procname | grep -v grep | awk '{ print $1 }'`
-    if test ! -z "$procpid" && test "$procpid" -ge 0; then
+    procname="$1"
+    is_process_running "$procname"
+    if test "$?" -eq 1; then
         $BIN_PKILL "$procname"
         sleep 2
-        procpid=`ps -eo pid,fname | grep $procname | grep -v grep | awk '{ print $1 }'`
-        if test ! -z "$procpid" && test "$procpid" -ge 0; then
+        is_process_running "$procname"
+        if test "$?" -eq 1; then
             subprint "Terminating: $procname  ...FAILED!"
             if test "$fatal" = "$FATALOP"; then
