From 685baaed339567728a1ef4827dba0a7f99c2da67 Mon Sep 17 00:00:00 2001 From: Michel Thebeau Date: Tue, 18 Sep 2018 15:15:12 -0400 Subject: [PATCH] update-motd: add motd.head to /etc The cron job for update-motd will run at the top of the hour and clobber an original /etc/motd file provided by 'setup' RPM. Consider that update-motd is intended to replace the motd provided by setup, and provide that same content in the update-motd package. In this way, the original content from setup RPM will be displayed until the cron job for update-motd runs. After that, unless the user has changed to the motd, the same content will be presented. Partial-Bug: 1790863 Change-Id: I2b66ce7475525920c52e129102fa859fb29e0eed Signed-off-by: Michel Thebeau --- utilities/update-motd/centos/build_srpm.data | 2 +- utilities/update-motd/centos/update-motd.spec | 3 +++ utilities/update-motd/files/motd.head | 5 +++++ 3 files changed, 9 insertions(+), 1 deletion(-) create mode 100644 utilities/update-motd/files/motd.head diff --git a/utilities/update-motd/centos/build_srpm.data b/utilities/update-motd/centos/build_srpm.data index 2ec7ea02f..112ca54f4 100644 --- a/utilities/update-motd/centos/build_srpm.data +++ b/utilities/update-motd/centos/build_srpm.data @@ -1,2 +1,2 @@ COPY_LIST="files/*" -TIS_PATCH_VER=1 +TIS_PATCH_VER=2 diff --git a/utilities/update-motd/centos/update-motd.spec b/utilities/update-motd/centos/update-motd.spec index 321547e27..bc91e5f30 100644 --- a/utilities/update-motd/centos/update-motd.spec +++ b/utilities/update-motd/centos/update-motd.spec @@ -14,6 +14,7 @@ Source4: customize-banner Source5: apply_banner_customization Source6: install_banner_customization Source7: LICENSE +Source8: motd.head Requires: crontabs @@ -35,6 +36,7 @@ install -d %{buildroot}%{_sysconfdir} install -d %{buildroot}%{_sysconfdir}/motd.d install -m 755 %{SOURCE1} %{buildroot}%{_sysconfdir}/motd.d/00-header install -m 755 %{SOURCE0} %{buildroot}%{_sysconfdir}/motd.d/99-footer +install -m 755 %{SOURCE8} %{buildroot}%{_sysconfdir}/motd.head install -d %{buildroot}%{_sysconfdir}/cron.d install -m 600 %{SOURCE3} %{buildroot}%{_sysconfdir}/cron.d/motd-update @@ -49,6 +51,7 @@ install -m 700 %{SOURCE6} %{buildroot}%{_sbindir}/install_banner_customization %{_sysconfdir}/motd.d/* /usr/sbin/* /etc/motd.d/* +%{_sysconfdir}/motd.head /etc/cron.d/* %{_sbindir}/motd-update %{_sbindir}/customize-banner diff --git a/utilities/update-motd/files/motd.head b/utilities/update-motd/files/motd.head new file mode 100644 index 000000000..e2c1470e6 --- /dev/null +++ b/utilities/update-motd/files/motd.head @@ -0,0 +1,5 @@ + +WARNING: Unauthorized access to this system is forbidden and will be +prosecuted by law. By accessing this system, you agree that your +actions may be monitored if unauthorized usage is suspected. +