summaryrefslogtreecommitdiff
path: root/cloudinit/config/cc_keys_to_console.py
diff options
context:
space:
mode:
authorharlowja <harlowja@virtualbox.rhel>2012-07-01 12:14:12 -0700
committerharlowja <harlowja@virtualbox.rhel>2012-07-01 12:14:12 -0700
commit346739701b2de2db2bf2065d946d611d55bc5653 (patch)
treedf2d11b7987ab67e457e126a84a738695d9f8eb7 /cloudinit/config/cc_keys_to_console.py
parent9e1ffb27f4f316638a1fe83678c19f7215a8ef4b (diff)
parentaa9189e89ec101fba8ca36919a7c800f8b28d5c0 (diff)
downloadvyos-cloud-init-346739701b2de2db2bf2065d946d611d55bc5653.tar.gz
vyos-cloud-init-346739701b2de2db2bf2065d946d611d55bc5653.zip
Merge in pending changes.
Diffstat (limited to 'cloudinit/config/cc_keys_to_console.py')
-rw-r--r--cloudinit/config/cc_keys_to_console.py6
1 files changed, 3 insertions, 3 deletions
diff --git a/cloudinit/config/cc_keys_to_console.py b/cloudinit/config/cc_keys_to_console.py
index d4c877f7..da7d5219 100644
--- a/cloudinit/config/cc_keys_to_console.py
+++ b/cloudinit/config/cc_keys_to_console.py
@@ -29,7 +29,7 @@ frequency = PER_INSTANCE
HELPER_TOOL = '/usr/lib/cloud-init/write-ssh-key-fingerprints'
-def handle(name, cfg, cloud, log, _args):
+def handle(name, cfg, _cloud, log, _args):
if not os.path.exists(HELPER_TOOL):
log.warn(("Unable to activate module %s,"
" helper tool not found at %s"), name, HELPER_TOOL)
@@ -46,7 +46,7 @@ def handle(name, cfg, cloud, log, _args):
cmd.append(','.join(fp_blacklist))
cmd.append(','.join(key_blacklist))
(stdout, _stderr) = util.subp(cmd)
- util.write_file(cloud.paths.join(False, '/dev/console'), stdout)
+ util.multi_log("%s\n" % (stdout.strip()), stderr=False)
except:
- log.warn("Writing keys to /dev/console failed!")
+ log.warn("Writing keys to the system console failed!")
raise