blob: 40b008e793536539f347eed20d46c4d5afb20309 [file] [log] [blame]
Jiri Broulik4ea221c2018-04-10 13:48:06 +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 day01 cloud image"
14echo "Build date: ${BUILD_TIMESTAMP_RFC}"
15EOF
16chmod +x /etc/update-motd.d/00-header-mirantis
17