Jiri Broulik | 4ea221c | 2018-04-10 13:48:06 +0200 | [diff] [blame] | 1 | #!/bin/bash -xe |
| 2 | # Motd |
| 3 | apt-get -y install update-motd |
| 4 | rm -vf /etc/update-motd.d/* |
| 5 | echo "BUILD_TIMESTAMP=$(date '+%Y-%m-%d-%H-%M-%S' -u)" > /etc/image_version |
| 6 | echo "BUILD_TIMESTAMP_RFC=\"$(date -u -R)\"" >> /etc/image_version |
| 7 | cat << 'EOF' >> /etc/update-motd.d/00-header-mirantis |
| 8 | #!/bin/sh |
| 9 | # |
| 10 | # 00-header - create the header of the MOTD |
| 11 | # |
| 12 | [ -r /etc/image_version ] && . /etc/image_version |
| 13 | echo "Ubuntu 16.04 \"Xenial\" Mirantis day01 cloud image" |
| 14 | echo "Build date: ${BUILD_TIMESTAMP_RFC}" |
| 15 | EOF |
| 16 | chmod +x /etc/update-motd.d/00-header-mirantis |
| 17 | |