blob: e215a2997eed150830181a1b47610eba229b5a53 [file] [log] [blame]
azvyagintseve1b236a2018-07-13 16:59:49 +03001#!/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 \"Trusty\" Mirantis cloud image"
14echo "Build date: ${BUILD_TIMESTAMP_RFC}"
15EOF
16chmod +x /etc/update-motd.d/00-header-mirantis
17