diff options
Diffstat (limited to 'src/VBox/Installer/solaris/checkinstall.sh')
-rwxr-xr-x | src/VBox/Installer/solaris/checkinstall.sh | 26 |
1 files changed, 25 insertions, 1 deletions
diff --git a/src/VBox/Installer/solaris/checkinstall.sh b/src/VBox/Installer/solaris/checkinstall.sh index 92c186ce..8dec8036 100755 --- a/src/VBox/Installer/solaris/checkinstall.sh +++ b/src/VBox/Installer/solaris/checkinstall.sh @@ -5,7 +5,7 @@ # # -# Copyright (C) 2009-2010 Oracle Corporation +# Copyright (C) 2009-2012 Oracle Corporation # # This file is part of VirtualBox Open Source Edition (OSE), as # available from http://www.virtualbox.org. This file is free software; @@ -162,6 +162,13 @@ if test ! -z "$VBOXNETDHCP_PID" && test "$VBOXNETDHCP_PID" -ge 0; then abort_error fi +# Check if VBoxNetNAT is currently running +VBOXNETNAT_PID=`ps -eo pid,fname | grep VBoxNetNAT | grep -v grep | awk '{ print $1 }'` +if test ! -z "$VBOXNETNAT_PID" && test "$VBOXNETNAT_PID" -ge 0; then + errorprint "VirtualBox's VBoxNetNAT (pid $VBOXNETNAT_PID) still appears to be running." + abort_error +fi + # Check if vboxnet is still plumbed, if so try unplumb it BIN_IFCONFIG=`which ifconfig 2> /dev/null` if test -x "$BIN_IFCONFIG"; then @@ -187,5 +194,22 @@ if test -x "$BIN_IFCONFIG"; then fi fi +# If we are using SVR4 packages then make sure that SMF has finished +# disabling any services left over from a previous installation which +# may interfere with installing new ones. Should only be relevant on +# Solaris 11. +if test -x "$BIN_PKGINFO"; then + for i in 1 2 3 4 5 6 7 8 9 10; do + svcs -a | grep virtualbox >/dev/null || break + if test "${i}" = "1"; then + printf "Waiting for services from previous installation to be removed." + else + printf "." + fi + sleep 1 + done + test "${i}" = "1" || printf "\n" +fi + exit 0 |