diff options
author | Scott Moser <smoser@ubuntu.com> | 2010-02-18 15:38:58 -0500 |
---|---|---|
committer | Scott Moser <smoser@ubuntu.com> | 2010-02-18 15:38:58 -0500 |
commit | 829ad6925f37df886ddada56757d692fbd544fac (patch) | |
tree | 19981b5c41b1ce9c8fc40ef69961cdd2394eef67 | |
parent | 7c77c9a7ec42597db9f3f9c04ecbf9563ceb8510 (diff) | |
download | vyos-cloud-init-829ad6925f37df886ddada56757d692fbd544fac.tar.gz vyos-cloud-init-829ad6925f37df886ddada56757d692fbd544fac.zip |
fix motd-hook in case of more than 4 fields in BUILD_FILE
if the BUILD_FILE file had more than 4 fields in it, 'serial' would get
all additional fields and would then look wrong in the message.
protect from that case by adding a var to 'read'.
-rwxr-xr-x | tools/motd-hook | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/tools/motd-hook b/tools/motd-hook index c6bec62d..8c482e8c 100755 --- a/tools/motd-hook +++ b/tools/motd-hook @@ -27,7 +27,7 @@ BUILD_FILE=/var/lib/cloud/data/available.build [ -s "${BUILD_FILE}" ] || exit 0 -read suite build_name name serial < "${BUILD_FILE}" +read suite build_name name serial other < "${BUILD_FILE}" cat <<EOF A newer build of the Ubuntu ${suite} ${build_name} image is available. |