diff options
Diffstat (limited to 'data/live-build-config')
-rwxr-xr-x | data/live-build-config/hooks/live/30-openvmtools-configs.chroot | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/data/live-build-config/hooks/live/30-openvmtools-configs.chroot b/data/live-build-config/hooks/live/30-openvmtools-configs.chroot index e3762cc9..ed734cab 100755 --- a/data/live-build-config/hooks/live/30-openvmtools-configs.chroot +++ b/data/live-build-config/hooks/live/30-openvmtools-configs.chroot @@ -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.') |