From 9470a6ce46d40e2c95680e84151e4c176e3086ca Mon Sep 17 00:00:00 2001 From: Oliver Smith Date: Wed, 5 Jul 2017 20:52:37 +0200 Subject: [PATCH] Close #92: pmOS-specific /etc/motd, /etc/issue --- aports/postmarketos-base/APKBUILD | 2 +- .../postmarketos-base.post-install | 21 +++++++++++++++++++ 2 files changed, 22 insertions(+), 1 deletion(-) diff --git a/aports/postmarketos-base/APKBUILD b/aports/postmarketos-base/APKBUILD index 3b1cd1e0..08b68b5b 100644 --- a/aports/postmarketos-base/APKBUILD +++ b/aports/postmarketos-base/APKBUILD @@ -1,6 +1,6 @@ pkgname=postmarketos-base pkgver=1 -pkgrel=8 +pkgrel=9 pkgdesc="Meta package for minimal postmarketos base" url="https://github.com/postmarketOS" arch="noarch" diff --git a/aports/postmarketos-base/postmarketos-base.post-install b/aports/postmarketos-base/postmarketos-base.post-install index 323bacea..c31ce1aa 100644 --- a/aports/postmarketos-base/postmarketos-base.post-install +++ b/aports/postmarketos-base/postmarketos-base.post-install @@ -25,3 +25,24 @@ for i in 1 2 3 4 5 6; do [ "$i" == "1" ] && new="tty1::respawn:/bin/login -f $autologin" sed -i -e "s.$old.$new.g" /etc/inittab done + +# Adjust welcome messages /etc (unless the files have been modified) +if ! apk audit /etc | grep -q etc/issue; then + { + echo 'Welcome to postmarketOS' + echo 'Kernel \r on an \m (\l)' + } >/etc/issue +fi +if ! apk audit /etc | grep -q etc/motd; then + { + echo 'Welcome to postmarketOS!' + echo '' + echo 'This distribution is based on Alpine Linux.' + echo 'Read both our wikis to find a large amount of how-to guides and' + echo 'general information about administrating and development.' + echo 'See and .' + echo '' + echo 'You may change this message by editing /etc/motd.' + echo '' + } >/etc/motd +fi