Support for ds-identify
This patch adds support for using the datasource with cloud-init
installations that leverage ds-identify
(https://github.com/number5/cloud-init/blob/master/tools/ds-identify).
The ds-identify program uses bash types (functions, scripts, etc.) to
determine whether or not a configured datasource is valid on the
installed system. The script in this patch allows the ds-identify
program to query whether or not the VMwareGuestInfo datasource is valid.
Otherwise, depending on how ds-identify is configured, a system
configured to use the VMwareGuestInfo datasource might actually have it
disabled after ds-identify fails to query the datasource's availability.
diff --git a/install.sh b/install.sh
index 06e04e7..6226690 100755
--- a/install.sh
+++ b/install.sh
@@ -36,4 +36,10 @@
curl -sSL -o /etc/cloud/cloud.cfg.d/99-DataSourceVMwareGuestInfo.cfg \
"${REPO_SLUG}/${GIT_REF}/99-DataSourceVMwareGuestInfo.cfg"
+# Download program used by ds-identify to determine wheether or not the
+# VMwareGuestInfo datasource is useable.
+curl -sSL -o "/usr/local/bin/dscheck_VMwareGuestInfo" \
+ "${REPO_SLUG}/${GIT_REF}/dscheck_VMwareGuestInfo.sh"
+chmod 0755 "/usr/local/bin/dscheck_VMwareGuestInfo"
+
echo "So long, and thanks for all the fish."