From 0ba8b74dcd548446f4bb22140f36ef8c362ff7e4 Mon Sep 17 00:00:00 2001 From: Reyk Floeter Date: Fri, 30 Jun 2017 21:34:12 +0200 Subject: [PATCH] Azure calls userdata CustomData. Get the variable, but we don't use it yet. --- agent/azure.c | 8 ++++++++ agent/cloudinit.c | 2 -- 2 files changed, 8 insertions(+), 2 deletions(-) diff --git a/agent/azure.c b/agent/azure.c index 6d70185..71c97a5 100644 --- a/agent/azure.c +++ b/agent/azure.c @@ -765,6 +765,14 @@ azure_getovfenv(struct system_config *sc) } } + if ((xe = xml_findl(&xp->xe_head, "CustomData", NULL)) != NULL) { + if ((sc->sc_userdata = + get_string(xe->xe_data, xe->xe_datalen)) == NULL) { + log_debug("%s: userdata failed", __func__); + goto done; + } + } + if ((fd = open(sc->sc_ovfenv, O_WRONLY|O_CREAT|O_TRUNC, 0600)) == -1 || (fp = fdopen(fd, "w")) == NULL) { log_debug("%s: failed to open %s", __func__, sc->sc_ovfenv); diff --git a/agent/cloudinit.c b/agent/cloudinit.c index a46e82a..92929ff 100644 --- a/agent/cloudinit.c +++ b/agent/cloudinit.c @@ -81,8 +81,6 @@ cloudinit_get(struct system_config *sc, const char *path, enum strtype type) str = get_word(g->bodypart, g->bodypartsz); break; } - - log_debug("%s: '%s'", __func__, str); } http_get_free(g);