diff options
author | Scott Moser <smoser@ubuntu.com> | 2013-03-07 16:27:47 -0500 |
---|---|---|
committer | Scott Moser <smoser@ubuntu.com> | 2013-03-07 16:27:47 -0500 |
commit | 3199df6e1489da03d51ac8a2a4574c27fd325189 (patch) | |
tree | 921700212c063d1b468a8ea2cac4f7df0f3a68d9 /tools/write-ssh-key-fingerprints | |
parent | 21aec9e44c27b9bf1c96314f0449fd39793d1c73 (diff) | |
parent | 8013c284e82349246b2274f5475c138323fd7c55 (diff) | |
download | vyos-cloud-init-3199df6e1489da03d51ac8a2a4574c27fd325189.tar.gz vyos-cloud-init-3199df6e1489da03d51ac8a2a4574c27fd325189.zip |
merge from trunk
Diffstat (limited to 'tools/write-ssh-key-fingerprints')
-rwxr-xr-x | tools/write-ssh-key-fingerprints | 15 |
1 files changed, 12 insertions, 3 deletions
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-----" |