summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--ChangeLog2
-rwxr-xr-xtools/write-ssh-key-fingerprints15
2 files changed, 14 insertions, 3 deletions
diff --git a/ChangeLog b/ChangeLog
index c02334a9..fbfd3385 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -5,6 +5,8 @@
- make sure there is no blank line before cloud-init entry in
there are no blank lines in /etc/ca-certificates.conf (LP: #1077020)
- fix sudoers writing when entry is a string (LP: #1079002)
+ - tools/write-ssh-key-fingerprints: use '-s' rather than '--stderr'
+ option (LP: #1083715)
0.7.1:
- sysvinit: fix missing dependency in cloud-init job for RHEL 5.6
- config-drive: map hostname to local-hostname (LP: #1061964)
diff --git a/tools/write-ssh-key-fingerprints b/tools/write-ssh-key-fingerprints
index aa1f3c38..6c3451fd 100755
--- a/tools/write-ssh-key-fingerprints
+++ b/tools/write-ssh-key-fingerprints
@@ -1,5 +1,14 @@
#!/bin/sh
+
+logger_opts="-p user.info -t ec2"
+
+# rhels' version of logger_opts does not support long
+# for of -s (--stderr), so use short form.
+logger_opts="$logger_opts -s"
+
+# Redirect stderr to stdout
exec 2>&1
+
fp_blist=",${1},"
key_blist=",${2},"
{
@@ -16,9 +25,9 @@ done
echo "-----END SSH HOST KEY FINGERPRINTS-----"
echo "#############################################################"
-} | logger -p user.info --stderr -t "ec2"
+} | logger $logger_opts
-echo -----BEGIN SSH HOST KEY KEYS-----
+echo "-----BEGIN SSH HOST KEY KEYS-----"
for f in /etc/ssh/ssh_host_*key.pub; do
[ -f "$f" ] || continue
read ktype line < "$f"
@@ -26,4 +35,4 @@ for f in /etc/ssh/ssh_host_*key.pub; do
[ "${key_blist#*,$ktype,}" = "${key_blist}" ] || continue
cat $f
done
-echo -----END SSH HOST KEY KEYS-----
+echo "-----END SSH HOST KEY KEYS-----"