Changeset 50572 in vbox
- Timestamp:
- Feb 25, 2014 10:25:44 AM (11 years ago)
- Location:
- trunk/src/VBox/Installer/darwin/VirtualBox_mpkg
- Files:
-
- 2 edited
-
Localizable.strings (modified) (1 diff)
-
distribution.dist (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Installer/darwin/VirtualBox_mpkg/Localizable.strings
r48974 r50572 11 11 12 12 'RUNNING_VMS_TLE' = "Running VirtualBox VM's detected!"; 13 'RUNNING_VMS_MSG' = "The installer has detected running Virtual Machines. Please shut down 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."; 14 14 15 15 'UNSUPPORTED_HW_MACHINE_TLE' = "Unsupported hardware architecture detected!"; -
trunk/src/VBox/Installer/darwin/VirtualBox_mpkg/distribution.dist
r49956 r50572 2 2 <!-- 3 3 # 4 # Copyright (C) 2008-201 2Oracle Corporation4 # Copyright (C) 2008-2014 Oracle Corporation 5 5 # 6 6 # This file is part of VirtualBox Open Source Edition (OSE), as … … 54 54 try 55 55 { 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 { 56 74 /* Embedded scripts are not available here. So, just do a command 57 75 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\''); 59 77 result = (rcScript != 0); 60 78 system.log("system.run /bin/sh .. returned: " + rcScript + " result=" + result);
Note:
See TracChangeset
for help on using the changeset viewer.

