Merge pull request #199 from erkin/equuleus

T3962: Check if open-vm-tools is present before attempting to write its config
This commit is contained in:
Daniil Baturin 2021-11-09 21:01:53 +07:00 committed by GitHub
commit a66f14c380
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -2,6 +2,7 @@
# open-vm-tools settings
import os
import re
vmtools_config = """
@ -10,5 +11,8 @@ vmtools_config = """
"""
with open('/etc/vmware-tools/tools.conf', 'w') as f:
f.write(vmtools_config)
if os.path.isdir('/etc/vmware-tools'):
with open('/etc/vmware-tools/tools.conf', 'w') as f:
f.write(vmtools_config)
else:
print('Open VM Tools not found. Skipping its configuration.')