Generate /etc/issue with Grml release information
authorMichael Prokop <mika@grml.org>
Fri, 24 Feb 2017 10:41:50 +0000 (11:41 +0100)
committerMichael Prokop <mika@grml.org>
Fri, 24 Feb 2017 10:41:50 +0000 (11:41 +0100)
This file is displayed by default on systemd systems, so
we want to have according Grml release information inside
it (instead of e.g. "Debian GNU/Linux 9 \n \l").

Closes grml/release-planning#5 @ GH

etc/grml/fai/config/scripts/GRMLBASE/46-grml-version

index c017ccd..f2e8d0b 100755 (executable)
@@ -12,5 +12,9 @@ set -e
 
 echo "Setting /etc/grml_version to $GRML_NAME $VERSION Release Codename $RELEASENAME [$DATE]"
 echo "$GRML_NAME $VERSION Release Codename $RELEASENAME [$DATE]" > $target/etc/grml_version
-chmod 644 $target/etc/grml_version
+chmod 644 "${target}/etc/grml_version"
+
+echo "Setting /etc/issue to $GRML_NAME $VERSION"
+printf "%s %s %s %s\n\n" "$GRML_NAME" "$VERSION" '\n' '\l' > "${target}/etc/issue"
+chmod 644 "${target}/etc/issue"