From 473ad6fbfe0b9c3b362b530492928303f2b4c7f3 Mon Sep 17 00:00:00 2001 From: Ɓukasz 'sil2100' Zemczak Date: Tue, 18 Apr 2017 12:27:57 +0200 Subject: Import patches-unapplied version 2.2.9-0ubuntu1 to ubuntu/zesty-proposed Imported using git-ubuntu import. Changelog parent: 83be006e288c58a46f5b76c29b6886c1f417d88c New changelog entries: * New upstream release (LP: #1683521). --- azurelinuxagent/pa/provision/default.py | 7 +++---- azurelinuxagent/pa/provision/ubuntu.py | 2 +- 2 files changed, 4 insertions(+), 5 deletions(-) (limited to 'azurelinuxagent/pa/provision') diff --git a/azurelinuxagent/pa/provision/default.py b/azurelinuxagent/pa/provision/default.py index a99a006..3a3f36f 100644 --- a/azurelinuxagent/pa/provision/default.py +++ b/azurelinuxagent/pa/provision/default.py @@ -87,10 +87,9 @@ class ProvisionHandler(object): thumbprint = self.get_ssh_host_key_thumbprint(keypair_type) return thumbprint - def get_ssh_host_key_thumbprint(self, keypair_type): - cmd = "ssh-keygen -lf /etc/ssh/ssh_host_{0}_key.pub".format( - keypair_type) - ret = shellutil.run_get_output(cmd) + def get_ssh_host_key_thumbprint(self, keypair_type, chk_err=True): + cmd = "ssh-keygen -lf /etc/ssh/ssh_host_{0}_key.pub".format(keypair_type) + ret = shellutil.run_get_output(cmd, chk_err=chk_err) if ret[0] == 0: return ret[1].rstrip().split()[1].replace(':', '') else: diff --git a/azurelinuxagent/pa/provision/ubuntu.py b/azurelinuxagent/pa/provision/ubuntu.py index a71df37..66866b2 100644 --- a/azurelinuxagent/pa/provision/ubuntu.py +++ b/azurelinuxagent/pa/provision/ubuntu.py @@ -91,7 +91,7 @@ class UbuntuProvisionHandler(ProvisionHandler): if os.path.isfile(path): logger.info("ssh host key found at: {0}".format(path)) try: - thumbprint = self.get_ssh_host_key_thumbprint(keypair_type) + thumbprint = self.get_ssh_host_key_thumbprint(keypair_type, chk_err=False) logger.info("Thumbprint obtained from : {0}".format(path)) return thumbprint except ProvisionError: -- cgit v1.2.3