Generate /etc/issue with Grml release information
[grml-live.git] / etc / grml / fai / config / scripts / GRMLBASE / 46-grml-version
1 #!/bin/sh
2 # Filename:      ${GRML_FAI_CONFIG}/config/scripts/GRMLBASE/46-grml-version
3 # Purpose:       Update grml version in the chroot
4 # Authors:       grml-team (grml.org)
5 # Bug-Reports:   see http://grml.org/bugs/
6 # License:       This file is licensed under the GPL v2 or any later version.
7 ################################################################################
8
9 set -u
10 set -e
11 . "$GRML_LIVE_CONFIG"
12
13 echo "Setting /etc/grml_version to $GRML_NAME $VERSION Release Codename $RELEASENAME [$DATE]"
14 echo "$GRML_NAME $VERSION Release Codename $RELEASENAME [$DATE]" > $target/etc/grml_version
15 chmod 644 "${target}/etc/grml_version"
16
17 echo "Setting /etc/issue to $GRML_NAME $VERSION"
18 printf "%s %s %s %s\n\n" "$GRML_NAME" "$VERSION" '\n' '\l' > "${target}/etc/issue"
19 chmod 644 "${target}/etc/issue"
20