integ/base/setup/centos/meta_patches/spec-set-custom-prompt.patch

43 lines
1.4 KiB
Diff

setup.spec: add custom shell login prompt
A user can be set to use "sh" (which points to bash) as login prompt.
This makes the login shell to enter "POSIX" mode which will only
read/executes file /etc/profle and files in /etc/profiled.d. So create
custom login prompt in /etc/profiles.d
---
SPECS/setup.spec | 3 +++
1 file changed, 3 insertions(+)
diff --git a/SPECS/setup.spec b/SPECS/setup.spec
index 3f74b90..184670f 100644
--- a/SPECS/setup.spec
+++ b/SPECS/setup.spec
@@ -7,6 +7,7 @@ Group: System Environment/Base
URL: https://fedorahosted.org/setup/
Source0: https://fedorahosted.org/releases/s/e/%{name}/%{name}-%{version}.tar.bz2
Source1: motd
+Source2: prompt.sh
BuildArch: noarch
BuildRequires: bash tcsh perl
#require system release for saner dependency order
@@ -59,6 +60,7 @@ touch %{buildroot}/etc/fstab
touch %{buildroot}/etc/subuid
touch %{buildroot}/etc/subgid
install -m 644 %{SOURCE1} %{buildroot}/etc/
+install -m 644 %{SOURCE2} %{buildroot}/etc/profile.d/prompt.sh
# remove unpackaged files from the buildroot
rm -f %{buildroot}/etc/Makefile
@@ -113,6 +115,7 @@ end
%config(noreplace) /etc/csh.cshrc
%config(noreplace) /etc/motd
%dir /etc/profile.d
+/etc/profile.d/prompt.sh
%config(noreplace) %verify(not md5 size mtime) /etc/shells
%ghost %attr(0644,root,root) %verify(not md5 size mtime) /var/log/lastlog
%ghost %verify(not md5 size mtime) %config(noreplace,missingok) /etc/fstab
--
1.8.3.1