summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rwxr-xr-xtools/ds-identify35
1 files changed, 35 insertions, 0 deletions
diff --git a/tools/ds-identify b/tools/ds-identify
index c39956fc..34bf0643 100755
--- a/tools/ds-identify
+++ b/tools/ds-identify
@@ -559,10 +559,45 @@ dscheck_OpenNebula() {
return ${DS_NOT_FOUND}
}
+ovf_vmware_guest_customization() {
+ # vmware guest customization
+
+ # virt provider must be vmware
+ [ "${DI_VIRT}" = "vmware" ] || return 1
+
+ # we have to have the plugin to do vmware customization
+ local found="" pkg="" pre="/usr/lib"
+ for pkg in vmware-tools open-vm-tools; do
+ if [ -f "$pre/$pkg/plugins/vmsvc/libdeployPkgPlugin.so" ]; then
+ found="$pkg"; break;
+ fi
+ done
+ [ -n "$found" ] || return 1
+
+ # disable_vmware_customization defaults to False.
+ # any value then other than false means disabled.
+ local key="disable_vmware_customization"
+ local match="" bp="${PATH_CLOUD_CONFD}/cloud.cfg"
+ match="$bp.d/*[Oo][Vv][Ff]*.cfg"
+ if check_config "$key" "$match"; then
+ debug 2 "${_RET_fname} set $key to $_RET"
+ case "$_RET" in
+ 0|false|False) return 0;;
+ *) return;;
+ esac
+ fi
+
+ return 1
+}
+
dscheck_OVF() {
local p=""
check_seed_dir ovf ovf-env.xml && return "${DS_FOUND}"
+ if ovf_vmware_guest_customization; then
+ return ${DS_FOUND}
+ fi
+
has_cdrom || return ${DS_NOT_FOUND}
# FIXME: currently just return maybe if there is a cdrom