summaryrefslogtreecommitdiff
path: root/tools/ds-identify
diff options
context:
space:
mode:
authorScott Moser <smoser@brickies.net>2017-02-28 11:35:35 -0500
committerScott Moser <smoser@brickies.net>2017-02-28 11:37:30 -0500
commit05afe04edbe4c28f2170194d226821c1e755ee2d (patch)
tree31112f485275f3ace23732bdda24fb7d9b1e67ab /tools/ds-identify
parent83606aecaae571ce8eb7d6499de028192d82f79b (diff)
downloadvyos-cloud-init-05afe04edbe4c28f2170194d226821c1e755ee2d.tar.gz
vyos-cloud-init-05afe04edbe4c28f2170194d226821c1e755ee2d.zip
tools/ds-identify: disable vmware_guest_customization by default.
ovf_vmware_guest_customization defaults to true in cloud-init, meaning that such customization is disabled. We just missed a return value causing ovf_vmware_guest_customization to effectively default to on. Also, when looking for setting look at /etc/cloud/cloud.cfg. This had been omitted in interest of performance, but we should be looking there.
Diffstat (limited to 'tools/ds-identify')
-rwxr-xr-xtools/ds-identify9
1 files changed, 5 insertions, 4 deletions
diff --git a/tools/ds-identify b/tools/ds-identify
index 34bf0643..e618963b 100755
--- a/tools/ds-identify
+++ b/tools/ds-identify
@@ -574,16 +574,17 @@ ovf_vmware_guest_customization() {
done
[ -n "$found" ] || return 1
- # disable_vmware_customization defaults to False.
- # any value then other than false means disabled.
+ # vmware customization is disabled by default
+ # (disable_vmware_customization=true). If it is set to false, then
+ # user has requested customization.
local key="disable_vmware_customization"
local match="" bp="${PATH_CLOUD_CONFD}/cloud.cfg"
- match="$bp.d/*[Oo][Vv][Ff]*.cfg"
+ match="$bp $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;;
+ *) return 1;;
esac
fi