summaryrefslogtreecommitdiff
path: root/tools
diff options
context:
space:
mode:
authorScott Moser <smoser@ubuntu.com>2012-09-24 14:40:41 -0400
committerScott Moser <smoser@ubuntu.com>2012-09-24 14:40:41 -0400
commit0a4f91c84c096e0b0df2e5a1d42c38609ae7fa93 (patch)
tree550c67d7e26bc7ce4ca723f1ba36eb9f50866d71 /tools
parent6c8b9dbae8beb4cb5ebab009b51f01f67114706f (diff)
downloadvyos-cloud-init-0a4f91c84c096e0b0df2e5a1d42c38609ae7fa93.tar.gz
vyos-cloud-init-0a4f91c84c096e0b0df2e5a1d42c38609ae7fa93.zip
send stderr from write-ssh-key-fingerprints to stdout
This changes all output write-ssh-key-fingerprints to go to its stdout by redirecting stderr to stdout. The reason for this is that cc_keys_to_console.py was swallowing stderr and not replaying it to /dev/console. Ideally, we'd have a way in 'util.subp' to do effectively the same thing as we're doing here in the shell script. LP: #1055688
Diffstat (limited to 'tools')
-rwxr-xr-xtools/write-ssh-key-fingerprints5
1 files changed, 3 insertions, 2 deletions
diff --git a/tools/write-ssh-key-fingerprints b/tools/write-ssh-key-fingerprints
index 5723c989..130fc0c1 100755
--- a/tools/write-ssh-key-fingerprints
+++ b/tools/write-ssh-key-fingerprints
@@ -1,4 +1,5 @@
#!/bin/sh
+exec 2>&1
fp_blist=",${1},"
key_blist=",${2},"
{
@@ -15,8 +16,6 @@ done
echo "-----END SSH HOST KEY FINGERPRINTS-----"
echo "#############################################################"
-} | logger -p user.info -s -t "ec2"
-
echo -----BEGIN SSH HOST KEY KEYS-----
for f in /etc/ssh/ssh_host_*key.pub; do
[ -f "$f" ] || continue
@@ -26,3 +25,5 @@ for f in /etc/ssh/ssh_host_*key.pub; do
cat $f
done
echo -----END SSH HOST KEY KEYS-----
+
+} | logger -p user.info --stderr -t "ec2"