mirror of
https://github.com/vyos/vyos-build.git
synced 2025-10-01 20:28:40 +02:00
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:
commit
a66f14c380
@ -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.')
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user