summaryrefslogtreecommitdiff
path: root/src/VBox/Installer/darwin/VirtualBox_mpkg
diff options
context:
space:
mode:
Diffstat (limited to 'src/VBox/Installer/darwin/VirtualBox_mpkg')
-rw-r--r--src/VBox/Installer/darwin/VirtualBox_mpkg/Localizable.strings4
-rw-r--r--src/VBox/Installer/darwin/VirtualBox_mpkg/distribution.dist24
2 files changed, 24 insertions, 4 deletions
diff --git a/src/VBox/Installer/darwin/VirtualBox_mpkg/Localizable.strings b/src/VBox/Installer/darwin/VirtualBox_mpkg/Localizable.strings
index 68313701f..0a2e8eeef 100644
--- a/src/VBox/Installer/darwin/VirtualBox_mpkg/Localizable.strings
+++ b/src/VBox/Installer/darwin/VirtualBox_mpkg/Localizable.strings
@@ -9,8 +9,8 @@
'choiceVBoxCLI_title' = '@VBOX_PRODUCT@ Command Line Utilities';
'choiceVBoxCLI_msg' = 'Installs the @VBOX_PRODUCT@ command line utilities into /usr/bin.';
-'RUNNING_VMS_TLE' = "Running VirtualBox VMs detected!";
-'RUNNING_VMS_MSG' = "The installer has detected running Virtual Machines. Please shutdown all running VirtualBox machines and then restart the installation.";
+'RUNNING_VMS_TLE' = "Running VirtualBox virtual machines detected!";
+'RUNNING_VMS_MSG' = "The installer has detected running virtual machines. Please shut down all running VirtualBox machines and then restart the installation.";
'UNSUPPORTED_HW_MACHINE_TLE' = "Unsupported hardware architecture detected!";
'UNSUPPORTED_HW_MACHINE_MSG' = "The installer has detected an unsupported architecture. VirtualBox only runs on the x86 and amd64 architectures.";
diff --git a/src/VBox/Installer/darwin/VirtualBox_mpkg/distribution.dist b/src/VBox/Installer/darwin/VirtualBox_mpkg/distribution.dist
index 82cd3297f..3749e3589 100644
--- a/src/VBox/Installer/darwin/VirtualBox_mpkg/distribution.dist
+++ b/src/VBox/Installer/darwin/VirtualBox_mpkg/distribution.dist
@@ -1,7 +1,7 @@
<?xml version="1.0" encoding="UTF-8"?>
<!--
#
-# Copyright (C) 2008-2012 Oracle Corporation
+# Copyright (C) 2008-2014 Oracle Corporation
#
# This file is part of VirtualBox Open Source Edition (OSE), as
# available from http://www.virtualbox.org. This file is free software;
@@ -18,6 +18,7 @@
<installation-check script="checkPrerequisite()"></installation-check>
<domains enable_anywhere="false" enable_currentUserHome="false" enable_localSystem="true"/>
<script>
+//<![CDATA[
/* js:pkmk:start */
function checkPrerequisite()
{
@@ -53,9 +54,27 @@
try
{
+ /* The following shell script uses tools which were added in 10.8
+ (Mountain Lion) and later, in particular pgrep and pkill. */
+ if (system.compareVersions(system.version['ProductVersion'], '10.8') >= 0)
+ {
+ /* Embedded scripts are not available here. So, just do a
+ command line checking if any VBoxXPCOMIPCD has more than one
+ client, and if there are none, kill all the usual suspects to
+ get a clean slate. This is done because the VirtualBox event
+ handling had a bug which allowed no longer present passive
+ event listeners to block VBoxSVC processes from exiting until
+ the waiting time was elapsed. In the extreme case this was
+ infinitely long, blocking updates. */
+ system.run('/bin/sh', '-c', 'pids=`/usr/bin/pgrep VBoxXPCOMIPCD` rc=0; [ -z "$pids" ] && rc=1; for i in $pids; do c=`/usr/sbin/lsof -p $i | /usr/bin/grep -E \'^[^ ]+ +[^ ]+ +[^ ]+ +[^ ]+ +unix\' | wc -l`; [ $c -le 2 ] || rc=1; done; if [ $rc -eq 0 ]; then pkill -KILL \'^(VirtualBox)|(VBoxNetDHCP)|(VBoxNetNAT)|(VBoxHeadless)|(VBoxXPCOMIPCD)|(VBoxSVC)$\'; sleep 1; fi');
+ }
+ } catch (e) { system.log(e); }
+
+ try
+ {
/* Embedded scripts are not available here. So, just do a command
line checking for running VMs instead. */
- rcScript = system.run('/bin/sh', '-c', '/bin/ps -e | /usr/bin/grep -E "VirtualBox.*startvm|VBoxNetDHCP|VBoxNetNAT|VBoxHeadless|VBoxSVC" | /usr/bin/grep -qv grep');
+ rcScript = system.run('/bin/sh', '-c', '/bin/ps -e | /usr/bin/grep -E \'[V]irtualBox.*startvm|[V]BoxNetDHCP|[V]BoxNetNAT|[V]BoxHeadless|[V]BoxSVC\'');
result = (rcScript != 0);
system.log("system.run /bin/sh .. returned: " + rcScript + " result=" + result);
} catch (e) { system.log(e); result = false; }
@@ -72,6 +91,7 @@
return result;
}
/* js:pkmk:end */
+//]]>
</script>
<background file="background.tif" alignment="topleft" scaling="none"/>
<welcome file="Welcome.rtf" mime-type="text/rtf" uti="public.rtf"/>