File: motd-hook

package info (click to toggle)
cloud-init 25.3-2
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 12,412 kB
  • sloc: python: 135,894; sh: 3,883; makefile: 141; javascript: 30; xml: 22
file content (23 lines) | stat: -rwxr-xr-x 685 bytes parent folder | download | duplicates (7)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
#!/bin/sh
# Copyright (C) 2010 Canonical Ltd.
#
# Authors: Scott Moser <smoser@ubuntu.com>
#
# This file is part of cloud-init. See LICENSE file for license information.

# 92-ec2-upgrade-available - update-motd script

# Determining if updates are available is possibly slow.
# a cronjob runs occasioinally and updates a file with information
# on the latest available release (if newer than current)

BUILD_FILE=/var/lib/cloud/data/available.build

[ -s "${BUILD_FILE}" ] || exit 0

read suite build_name name serial other < "${BUILD_FILE}"

cat <<EOF
A newer build of the Ubuntu ${suite} ${build_name} image is available.
It is named '${name}' and has build serial '${serial}'.
EOF