VirtualBox

Changeset 50572 in vbox


Ignore:
Timestamp:
Feb 25, 2014 10:25:44 AM (11 years ago)
Author:
vboxsync
Message:

Installer/darwin: kill idle VBoxSVC instances which may exist due to a bug in the previously installed version, plus a minor wording change for the messages

Location:
trunk/src/VBox/Installer/darwin/VirtualBox_mpkg
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/Installer/darwin/VirtualBox_mpkg/Localizable.strings

    r48974 r50572  
    1111
    1212'RUNNING_VMS_TLE' = "Running VirtualBox VM's detected!";
    13 'RUNNING_VMS_MSG' = "The installer has detected running Virtual Machines. Please shutdown all running VirtualBox machines and then restart the installation.";
     13'RUNNING_VMS_MSG' = "The installer has detected running Virtual Machines. Please shut down all running VirtualBox machines and then restart the installation.";
    1414
    1515'UNSUPPORTED_HW_MACHINE_TLE' = "Unsupported hardware architecture detected!";
  • trunk/src/VBox/Installer/darwin/VirtualBox_mpkg/distribution.dist

    r49956 r50572  
    22<!--
    33#
    4 # Copyright (C) 2008-2012 Oracle Corporation
     4# Copyright (C) 2008-2014 Oracle Corporation
    55#
    66# This file is part of VirtualBox Open Source Edition (OSE), as
     
    5454       try
    5555       {
     56           /* The following shell script uses tools which were added in 10.8
     57              (Mountain Lion) and later, in particular pgrep and pkill. */
     58           if (system.compareVersions(system.version['ProductVersion'], '10.8') >= 0)
     59           {
     60               /* Embedded scripts are not available here. So, just do a
     61                  command line checking if any VBoxXPCOMIPCD has more than one
     62                  client, and if there are none, kill all the usual suspects to
     63                  get a clean slate. This is done because the VirtualBox event
     64                  handling had a bug which allowed no longer present passive
     65                  event listeners to block VBoxSVC processes from exiting until
     66                  the waiting time was elapsed. In the extreme case this was
     67                  infinitely long, blocking updates. */
     68               system.run('/bin/sh', '-c', 'pids=`/usr/bin/pgrep VBoxXPCOMIPCD` rc=0; [ -n "$pid" ] || 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 \'^(VirtualBox)|(VBoxNetDHCP)|(VBoxNetNAT)|(VBoxHeadless)|(VBoxXPCOMIPCD)|(VBoxSVC)$\'; sleep 1; fi');
     69           }
     70       } catch (e) { system.log(e); }
     71
     72       try
     73       {
    5674           /* Embedded scripts are not available here. So, just do a command
    5775              line checking for running VMs instead. */
    58            rcScript = system.run('/bin/sh', '-c', '/bin/ps -e | /usr/bin/grep -E "VirtualBox.*startvm|VBoxNetDHCP|VBoxNetNAT|VBoxHeadless|VBoxSVC" | /usr/bin/grep -qv grep');
     76           rcScript = system.run('/bin/sh', '-c', '/bin/ps -e | /usr/bin/grep -E \'V[i]rtualBox.*startvm|VBoxNetDHCP|VBoxNetNAT|VBoxHeadless|VBoxSVC\'');
    5977           result = (rcScript != 0);
    6078           system.log("system.run /bin/sh .. returned: " + rcScript + " result=" + result);
Note: See TracChangeset for help on using the changeset viewer.

© 2024 Oracle Support Privacy / Do Not Sell My Info Terms of Use Trademark Policy Automated Access Etiquette