From eb9d5b440c2ef8d592cdb252c68e44bd06516bf7 Mon Sep 17 00:00:00 2001 From: Reyk Floeter Date: Mon, 14 Aug 2017 17:59:35 +0200 Subject: [PATCH] Configure Azure -n, but don't apply confiugration --- agent/azure.c | 22 +++++++++------------- 1 file changed, 9 insertions(+), 13 deletions(-) diff --git a/agent/azure.c b/agent/azure.c index 6af3abe..5d2168a 100644 --- a/agent/azure.c +++ b/agent/azure.c @@ -77,12 +77,6 @@ azure(struct system_config *sc) goto done; } - if (sc->sc_dryrun) { - /* Return after backing up the ovf-env.xml file */ - ret = 0; - goto done; - } - if (azure_getendpoint(sc) != 0) { log_warnx("failed to get endpoint"); goto done; @@ -98,14 +92,16 @@ azure(struct system_config *sc) goto done; } - if (azure_keys(sc) != 0) { - log_warnx("failed to get transport keys"); - goto done; - } + if (!sc->sc_dryrun) { + if (azure_keys(sc) != 0) { + log_warnx("failed to get transport keys"); + goto done; + } - if (azure_certificates(sc) != 0) { - log_warnx("failed to get certificates"); - goto done; + if (azure_certificates(sc) != 0) { + log_warnx("failed to get certificates"); + goto done; + } } if (azure_reporthealth(sc, "Ready") != 0) {