virtual-appliance/scripts/motd.sh

42 lines
786 B
Bash
Raw Permalink Normal View History

#!/bin/sh
# Script for creating the motd on a virtual appliance image
EXTERNAL_KERNEL=$1
VIRTIO=$2
DISK_SIZE=$3
SWAP_SIZE=$4
The great systemd commit. This change converts the appliances from openrc to systemd. In addition, systemd needs to at least be be installed on the build machine as we now use systemd-nspawn instead of chroot/bind mounts do to the fact that systemd-nspawn is much more robust and lese prone to errors. In addition: * All stage4 tarballs and images are now stored in the images/ directory by default. * A package dir is now required and is set up in the packages/ directory by default. * The portage directory is not unpacked in the chroot every time anymore and is instead bind-mounted from a directory by systemd-nspawn. This is the portage/ directory by default. * In addition there is a distfiles/ directory (by default) which is bind-mounted in the chroot. It does what you'd probably expect. * The Makefile learned new target, eclean, which will run eclean-dist and eclean-pkg to clean out obsolete distfiles and binary packages. * The REMOVE_PORTAGE_TREE option is removed as portage is no longer installed. * The unused/untested PRUNE_CRITICAL functionality has been removed. I have no idea if it worked and if it didn't I didn't want to fix it. * As appliances are always using systemd, UDEV is no longer optional. * Timezones and hostnames are now handled by systemd (systemd-firstboot). * Stage4 tarballs are now directly importable as systemd containers (and probably docker too though I haven't tested that yet). * A number of packages (for example dhcpd, acpid) have been removed from the appliances when systemd provides equivalent functionality. * We no longer override etc-update.conf. There's no reason. * A number of Makefile targets, checkpoints, temp files, etc have been removed as they are no longer needed.
2015-02-22 16:32:16 +01:00
DASH=$5
ARCH=$6
TZ=$TIMEZONE ; export TZ
cat << EOF
Welcome to ${HOSTNAME}!
This system created by Gentoo Virtual Appliance:
https://bitbucket.org/marduk/virtual-appliance/
The system image was built on `date +"%Y-%m-%d %H:%M %Z"` based on the "${APPLIANCE}"
appliance. It was built with the following features:
EOF
cat << EOF | column -c80
APPLIANCE: ${APPLIANCE}
ARCH: ${ARCH}
HOSTNAME: ${HOSTNAME}
HEADLESS: ${HEADLESS}
EXTERNAL_KERNEL: ${EXTERNAL_KERNEL}
VIRTIO: ${VIRTIO}
DISK_SIZE: ${DISK_SIZE}
SWAP_SIZE: ${SWAP_SIZE}M
DASH: ${DASH}
EOF
if [ -x "${APPLIANCE}/motd.sh" ]
then
"${APPLIANCE}/motd.sh" $@
fi
echo