Check for Virtualbox.app

Signed-off-by: Jeffrey Morgan <jmorganca@gmail.com>
This commit is contained in:
Jeffrey Morgan 2015-08-12 14:56:02 -07:00
parent 895c92cce7
commit 2c3299a986
1 changed files with 2 additions and 2 deletions

View File

@ -114,7 +114,7 @@
{ {
test = system.version['ProductVersion']; test = system.version['ProductVersion'];
system.log("OS version detected: " + test); system.log("OS version detected: " + test);
result = (system.compareVersions(test, '10.6') >= 0); result = (system.compareVersions(test, '10.9') >= 0);
} catch (e) { system.log(e); result = false; } } catch (e) { system.log(e); result = false; }
if (!result) if (!result)
@ -131,7 +131,7 @@
line checking for running VMs instead. */ line checking for running VMs instead. */
if (vboxNeedsUpgrade()) { if (vboxNeedsUpgrade()) {
system.log(vboxplist.CFBundleVersion); system.log(vboxplist.CFBundleVersion);
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 "VirtualBox|VirtualBox.*startvm|VBoxNetDHCP|VBoxNetNAT|VBoxHeadless|VBoxSVC" | /usr/bin/grep -qv grep');
result = (rcScript != 0); result = (rcScript != 0);
system.log("system.run /bin/sh .. returned: " + rcScript + " result=" + result); system.log("system.run /bin/sh .. returned: " + rcScript + " result=" + result);
} }