Name: fermilab-conf_doe-banner-console Version: 1.0 Release: 5 Summary: Includes the FNAL approved text for the DOE notice at a console Group: Fermilab License: GPL URL: http://helpdesk.fnal.gov Source0: doe_banner.txt Source1: default_banner.txt BuildRequires: coreutils BuildArch: noarch # the 'setup' rpm provides /etc/motd # which we are about to change out. # the 'system-release' rpm provides /etc/issue # which we are about to change out. Requires: filesystem Requires(post): setup coreutils policycoreutils system-release Requires(preun): setup coreutils policycoreutils system-release %description The DOE requests that we publish a login banner on all systems so that people understand their rights and restrictions on the systems. Requirement from: CS-doc-5536-v1 %prep %build %{__cp} %{SOURCE0} . %{__cp} %{SOURCE1} . %install %{__rm} -rf %{buildroot} %{__install} -D %{SOURCE0} %{buildroot}/%{_libexecdir}/%{name}/doe_banner.txt %{__install} -D %{SOURCE1} %{buildroot}/%{_libexecdir}/%{name}/default_banner.txt %clean %{__rm} -rf %{buildroot} %post -p /bin/bash %{__cat} %{_libexecdir}/%{name}/doe_banner.txt > %{_sysconfdir}/motd %{__cat} %{_libexecdir}/%{name}/doe_banner.txt > %{_sysconfdir}/issue echo > %{_sysconfdir}/issue.net restorecon -F %{_sysconfdir}/motd %{_sysconfdir}/issue %{_sysconfdir}/issue.net >/dev/null 2>&1 %{_fixperms} %{_sysconfdir}/motd %{_sysconfdir}/issue %{_sysconfdir}/issue.net %preun -p /bin/bash if [[ $1 == 0 ]]; then echo > %{_sysconfdir}/motd %{__cat} %{_libexecdir}/%{name}/default_banner.txt > %{_sysconfdir}/issue %{__cat} %{_libexecdir}/%{name}/default_banner.txt > %{_sysconfdir}/issue.net restorecon -F %{_sysconfdir}/motd %{_sysconfdir}/issue %{_sysconfdir}/issue.net >/dev/null 2>&1 %{_fixperms} %{_sysconfdir}/motd %{_sysconfdir}/issue %{_sysconfdir}/issue.net fi %files %defattr(0644,root,root,0755) %{_libexecdir}/%{name}/doe_banner.txt %{_libexecdir}/%{name}/default_banner.txt %changelog * Thu Jan 18 2018 Pat Riehecky 1.0-5 - Better Dockerization * Mon Apr 03 2017 Pat Riehecky 1.0-4 - Put back the defaults on uninstall * Thu Feb 25 2016 Pat Riehecky 1.0-3 - Also set /etc/issue * Wed Sep 9 2015 Pat Riehecky 1.0-2 - No longer conflicts with setup * Fri Aug 7 2015 Pat Riehecky 1.0-1 - Initial build for EL7