checkinstall.sh revision 59b2242e48b5ce2db94af56e1eaa0dae2f83ea4e
## @file
#
# VirtualBox checkinstall script for Solaris.
#
#
# Copyright (C) 2009-2010 Oracle Corporation
#
# This file is part of VirtualBox Open Source Edition (OSE), as
# available from http://www.virtualbox.org. This file is free software;
# General Public License (GPL) as published by the Free Software
# Foundation, in version 2 as it comes in the "COPYING" file of the
# VirtualBox OSE distribution. VirtualBox OSE is distributed in the
# hope that it will be useful, but WITHOUT ANY WARRANTY of any kind.
#
{
echo 1>&2 "$1"
}
{
echo 1>&2 "## $1"
}
{
errorprint "Please close all VirtualBox processes and re-run this installer."
errorprint "Note: It can take up to 10 seconds for all VirtualBox & related processes to close."
exit 1
}
# nothing to check for targetted install
if test "x$PKG_INSTALL_ROOT" != "x/"; then
exit 0
fi
# Check if the Zone Access service is holding open vboxdrv, if so stop & remove it
if test ! -z "$servicefound"; then
infoprint "VirtualBox's zone access service appears to still be running."
infoprint "Halting & removing zone access service..."
# Don't delete the service, handled by manifest class action
# /usr/sbin/svccfg delete svc:/application/virtualbox/zoneaccess
fi
# Check if the Web service is running, if so stop & remove it
if test ! -z "$servicefound"; then
infoprint "VirtualBox web service appears to still be running."
infoprint "Halting & removing webservice..."
# Don't delete the service, handled by manifest class action
# /usr/sbin/svccfg delete svc:/application/virtualbox/webservice
fi
# Check if VBoxSVC is currently running
errorprint "VirtualBox's VBoxSVC (pid $VBOXSVC_PID) still appears to be running."
fi
# Check if VBoxNetDHCP is currently running
errorprint "VirtualBox's VBoxNetDHCP (pid $VBOXNETDHCP_PID) still appears to be running."
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
vboxnetup=`$BIN_IFCONFIG vboxnet0 >/dev/null 2>&1`
infoprint "VirtualBox NetAdapter is still plumbed"
infoprint "Trying to remove old NetAdapter..."
errorprint "VirtualBox NetAdapter 'vboxnet0' couldn't be unplumbed (probably in use)."
fi
fi
infoprint "VirtualBox NetAdapter (Ipv6) is still plumbed"
infoprint "Trying to remove old NetAdapter..."
errorprint "VirtualBox NetAdapter 'vboxnet0' IPv6 couldn't be unplumbed (probably in use)."
fi
fi
fi
exit 0