
Story: 2003389 Task: 24485 Change-Id: I04645b69e0e86e70cf168fbfe6c118af2cb961a3 Signed-off-by: slin14 <shuicheng.lin@intel.com>
47 lines
1.7 KiB
Diff
47 lines
1.7 KiB
Diff
From d298b3b8a8a27e23d1589b99a2f9419505563a92 Mon Sep 17 00:00:00 2001
|
|
From: slin14 <shuicheng.lin@intel.com>
|
|
Date: Tue, 7 Aug 2018 22:53:18 +0800
|
|
Subject: [PATCH 03/15] 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
|
|
|
|
Signed-off-by: slin14 <shuicheng.lin@intel.com>
|
|
---
|
|
SPECS/setup.spec | 3 +++
|
|
1 file changed, 3 insertions(+)
|
|
|
|
diff --git a/SPECS/setup.spec b/SPECS/setup.spec
|
|
index 72cbcba..aa6b36e 100644
|
|
--- a/SPECS/setup.spec
|
|
+++ b/SPECS/setup.spec
|
|
@@ -7,6 +7,7 @@ Group: System Environment/Base
|
|
URL: https://pagure.io/setup/
|
|
Source0: http://releases.pagure.org/%{name}/%{name}-%{version}.tar.bz2
|
|
Source1: motd
|
|
+Source2: prompt.sh
|
|
BuildArch: noarch
|
|
BuildRequires: bash tcsh perl
|
|
#require system release for saner dependency order
|
|
@@ -63,6 +64,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
|
|
mkdir -p %{buildroot}/etc/profile.d
|
|
echo "#Add any required envvar overrides to this file, it is sourced from /etc/profile" >%{buildroot}/etc/profile.d/sh.local
|
|
echo "#Add any required envvar overrides to this file, is sourced from /etc/csh.login" >%{buildroot}/etc/profile.d/csh.local
|
|
@@ -121,6 +123,7 @@ end
|
|
%config(noreplace) /etc/csh.cshrc
|
|
%config(noreplace) /etc/motd
|
|
%dir /etc/profile.d
|
|
+/etc/profile.d/prompt.sh
|
|
%config(noreplace) /etc/profile.d/sh.local
|
|
%config(noreplace) /etc/profile.d/csh.local
|
|
%config(noreplace) %verify(not md5 size mtime) /etc/shells
|
|
--
|
|
2.7.4
|
|
|