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'.
This commit is contained in:
@@ -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.
|
||||
|
||||
Reference in New Issue
Block a user