summaryrefslogtreecommitdiff
path: root/packages
diff options
context:
space:
mode:
authorAbdoulaye Walsimou Gaye <awg@embtoolkit.org>2014-11-09 12:13:24 +0100
committerAbdoulaye Walsimou Gaye <awg@embtoolkit.org>2014-11-09 12:51:14 +0100
commitbbb2c06bebcc939bbdbf4c61b4cb91147b568a9b (patch)
tree8f1adbdb5d5700a59af73b5684c6fbde313eaf4a /packages
parent186998c6ab391c021afc91472358854a908e3ee8 (diff)
downloadembtoolkit-bbb2c06bebcc939bbdbf4c61b4cb91147b568a9b.tar.gz
embtoolkit-bbb2c06bebcc939bbdbf4c61b4cb91147b568a9b.tar.bz2
embtoolkit-bbb2c06bebcc939bbdbf4c61b4cb91147b568a9b.tar.xz
RootFS: add a build tag in /etc/issue
Signed-off-by: Abdoulaye Walsimou Gaye <awg@embtoolkit.org>
Diffstat (limited to 'packages')
-rw-r--r--packages/system/openrc/etc/issue.freebsd2
-rw-r--r--packages/system/openrc/etc/issue.linux2
-rw-r--r--packages/system/openrc/openrc.mk18
3 files changed, 17 insertions, 5 deletions
diff --git a/packages/system/openrc/etc/issue.freebsd b/packages/system/openrc/etc/issue.freebsd
index fe280b9..494be26 100644
--- a/packages/system/openrc/etc/issue.freebsd
+++ b/packages/system/openrc/etc/issue.freebsd
@@ -17,5 +17,5 @@
888 888 Y8b. Y8b. 888 d88P Y88b d88P 888 .d88P
888 888 "Y8888 "Y8888 8888888P" "Y8888P" 8888888P"
-Welcome to EmbToolkit FreeBSD development environment.
+{{EMBTK_BUILDER} - {EMBTK_XCOMPILE_ENV} - {EMBTK_CLIBRARY_ENV}}
diff --git a/packages/system/openrc/etc/issue.linux b/packages/system/openrc/etc/issue.linux
index 06b3f97..5e37fee 100644
--- a/packages/system/openrc/etc/issue.linux
+++ b/packages/system/openrc/etc/issue.linux
@@ -17,5 +17,5 @@
888 888 888 888 Y88b 888 .d8""8b.
88888888 888 888 888 "Y88888 888 888
-Welcome to EmbToolkit Linux development environment.
+{{EMBTK_BUILDER} - {EMBTK_XCOMPILE_ENV} - {EMBTK_CLIBRARY_ENV}}
diff --git a/packages/system/openrc/openrc.mk b/packages/system/openrc/openrc.mk
index 02ceaf9..492c9f8 100644
--- a/packages/system/openrc/openrc.mk
+++ b/packages/system/openrc/openrc.mk
@@ -112,6 +112,20 @@ define __embtk_install_openrc_inittab
cat $(embtk_openrc_mk)/etc/inittab.reboot \
>> $(embtk_rootfs)/etc/inittab
endef
+
+__embtk_rootfs_builder := $$USER@$$(uname -n) $$(date +%Y%m%d.%H%M%S.%Z)
+__embtk_rootfs_clibraryenv := $(call __embtk_pkg_name,$(embtk_clib)) v$(call __embtk_pkg_version,$(embtk_clib))
+__embtk_rootfs_xcompileenv = $(embtk_targetcc_name-v)
+define __embtk_install_openrc_issue
+ cat $(embtk_openrc_mk)/etc/issue.linux | \
+ sed -e "s;{EMBTK_VERSION};$(EMBTK_VERSION);" \
+ -e "s;{EMBTK_BUILDER};$(__embtk_rootfs_builder);" \
+ -e "s;{EMBTK_XCOMPILE_ENV};$(__embtk_rootfs_xcompileenv);" \
+ -e "s;{EMBTK_CLIBRARY_ENV};$(__embtk_rootfs_clibraryenv);" \
+ >> $(embtk_rootfs)/etc/issue
+ chmod 0644 $(embtk_rootfs)/etc/issue
+endef
+
define embtk_postinstall_openrc
$(__embtk_install_openrc_confd)
$(__embtk_install_openrc_inittab)
@@ -121,9 +135,7 @@ define embtk_postinstall_openrc
$(embtk_rootfs)/etc/defaultdomain || exit $$?
install -m 0644 $(embtk_openrc_mk)/etc/rc.conf \
$(embtk_rootfs)/etc/rc.conf || exit $$?
- $(if $(CONFIG_EMBTK_OS_LINUX),
- install -m 0644 $(embtk_openrc_mk)/etc/issue.linux \
- $(embtk_rootfs)/etc/issue)
+ $(__embtk_install_openrc_issue)
$(call __embtk_install_openrc_runlevel,sysinit)
$(call __embtk_install_openrc_runlevel,boot)
$(call __embtk_install_openrc_runlevel,default)