Update /etc/grml_version in GRMLBASE script instead of grml-live
[grml-live.git] / etc / grml / fai / config / scripts / GRMLBASE / 46-grml-version
diff --git a/etc/grml/fai/config/scripts/GRMLBASE/46-grml-version b/etc/grml/fai/config/scripts/GRMLBASE/46-grml-version
new file mode 100755 (executable)
index 0000000..c017ccd
--- /dev/null
@@ -0,0 +1,16 @@
+#!/bin/sh
+# Filename:      ${GRML_FAI_CONFIG}/config/scripts/GRMLBASE/46-grml-version
+# Purpose:       Update grml version in the chroot
+# Authors:       grml-team (grml.org)
+# Bug-Reports:   see http://grml.org/bugs/
+# License:       This file is licensed under the GPL v2 or any later version.
+################################################################################
+
+set -u
+set -e
+. "$GRML_LIVE_CONFIG"
+
+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
+