From: Jackie Huang Date: Mon, 4 May 2020 13:40:35 +0000 (+0800) Subject: config-files: add starlingx login banners X-Git-Tag: bronze-rc0~35 X-Git-Url: https://gerrit.o-ran-sc.org/r/gitweb?a=commitdiff_plain;h=246e12d43a4243e407b347d769db6b2f5edfdb55;p=pti%2Frtp.git config-files: add starlingx login banners Add starlingx login banners into /etc/issue and /etc/issue.net Issue-ID: INF-80 Signed-off-by: Jackie Huang Change-Id: I17963c57656fd95ec779b6bdc55900af7348b5df --- diff --git a/meta-stx/recipes-core/packagegroups/packagegroup-stx.bb b/meta-stx/recipes-core/packagegroups/packagegroup-stx.bb index e4487dc..88736a3 100644 --- a/meta-stx/recipes-core/packagegroups/packagegroup-stx.bb +++ b/meta-stx/recipes-core/packagegroups/packagegroup-stx.bb @@ -70,6 +70,7 @@ RDEPENDS_packagegroup-stx-config = " \ RDEPENDS_packagegroup-stx-config-files = " \ audit-config \ + centos-release-config \ dhclient-config \ dnsmasq-config \ docker-config \ diff --git a/meta-stx/recipes-core/stx-config-files/config-files_1.0.0.bb b/meta-stx/recipes-core/stx-config-files/config-files_1.0.0.bb index 4c8a4d0..67b0e5e 100644 --- a/meta-stx/recipes-core/stx-config-files/config-files_1.0.0.bb +++ b/meta-stx/recipes-core/stx-config-files/config-files_1.0.0.bb @@ -69,7 +69,6 @@ do_install () { tar -c $f -f - | tar -C ${D}/${datadir}/starlingx/config-files -xf -; done find ${D}/${datadir}/starlingx/config-files -name centos -exec rm -rf {} + - rm -rf ${D}/${datadir}/starlingx/config-files/centos-release-config chown -R root:root ${D}/${datadir}/starlingx/config-files/ # For io-scheduler-config @@ -80,6 +79,7 @@ do_install () { PACKAGES ?= "" PACKAGES += "audit-config" +PACKAGES += "centos-release-config" PACKAGES += "dhclient-config" PACKAGES += "dnsmasq-config" PACKAGES += "docker-config" @@ -111,6 +111,7 @@ PACKAGES += "util-linux-config" FILES_${PN} = "" FILES_audit-config = "${datadir}/starlingx/config-files/audit-config/" +FILES_centos-release-config = "${datadir}/starlingx/config-files/centos-release-config/" FILES_dhclient-config = "${datadir}/starlingx/config-files/dhcp-config/" FILES_dnsmasq-config = "${datadir}/starlingx/config-files/dnsmasq-config/" FILES_docker-config = "${datadir}/starlingx/config-files/docker-config/" @@ -250,6 +251,13 @@ pkg_postinst_ontarget_audit-config() { chmod 640 ${sysconfdir}/audisp/plugins.d/syslog.conf } +pkg_postinst_centos-release-config() { + sed 's/@PLATFORM_RELEASE@/${STX_REL}/' $D${datadir}/starlingx/config-files/centos-release-config/files/issue >> $D${sysconfdir}/issue + sed 's/@PLATFORM_RELEASE@/${STX_REL}/' $D${datadir}/starlingx/config-files/centos-release-config/files/issue.net >> $D${sysconfdir}/issue.net + chmod 644 $D${sysconfdir}/issue + chmod 644 $D${sysconfdir}/issue.net +} + pkg_postinst_ontarget_dhclient-config() { SRCPATH=${datadir}/starlingx/config-files/dhcp-config/files install -m 0755 -p ${SRCPATH}/dhclient-enter-hooks ${sysconfdir}/dhcp/dhclient-enter-hooks