blob: 839a3e4ad48af975d608c7fcad86a716ae367185 [file] [log] [blame]
azvyagintsevc0d1b8a2018-03-22 19:05:03 +02001#!/bin/bash -xe
2# Motd
3apt-get -y install update-motd
4rm -vf /etc/update-motd.d/*
5echo "BUILD_TIMESTAMP=$(date '+%Y-%m-%d-%H-%M-%S' -u)" > /etc/image_version
6echo "BUILD_TIMESTAMP_RFC=\"$(date -u -R)\"" >> /etc/image_version
7cat << '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
13echo "Ubuntu 16.04 \"Xenial\" Mirantis offline cloud image"
14echo "Build date: ${BUILD_TIMESTAMP_RFC}"
15EOF
16chmod +x /etc/update-motd.d/00-header-mirantis
17