fix #467025 - Ksh fails to initialise environment when login from graphic
console
This commit is contained in:
parent
a8955dc0a5
commit
9d5844ce66
8
dotkshrc
Normal file
8
dotkshrc
Normal file
@ -0,0 +1,8 @@
|
|||||||
|
# .kshrc
|
||||||
|
|
||||||
|
# Source global definitions
|
||||||
|
if [ -f /etc/kshrc ]; then
|
||||||
|
. /etc/kshrc
|
||||||
|
fi
|
||||||
|
|
||||||
|
# User specific aliases and functions
|
12
ksh.spec
12
ksh.spec
@ -8,10 +8,12 @@ URL: http://www.kornshell.com/
|
|||||||
Group: System Environment/Shells
|
Group: System Environment/Shells
|
||||||
License: CPL
|
License: CPL
|
||||||
Version: 20080725
|
Version: 20080725
|
||||||
Release: 3%{?dist}
|
Release: 4%{?dist}
|
||||||
Source0: http://www.research.att.com/~gsf/download/tgz/ast-ksh.%{releasedate}.tgz
|
Source0: http://www.research.att.com/~gsf/download/tgz/ast-ksh.%{releasedate}.tgz
|
||||||
Source1: http://www.research.att.com/~gsf/download/tgz/INIT.%{releasedate}.tgz
|
Source1: http://www.research.att.com/~gsf/download/tgz/INIT.%{releasedate}.tgz
|
||||||
Source2: http://www.research.att.com/~gsf/download/tgz/ast-ksh-locale.%{releasedate}.tgz
|
Source2: http://www.research.att.com/~gsf/download/tgz/ast-ksh-locale.%{releasedate}.tgz
|
||||||
|
Source3: kshrc.rhs
|
||||||
|
Source4: dotkshrc
|
||||||
#Patch0: ksh-20041225-gcc4.patch
|
#Patch0: ksh-20041225-gcc4.patch
|
||||||
Patch1: ksh-20070328-uname.patch
|
Patch1: ksh-20070328-uname.patch
|
||||||
Patch2: ksh-20070328-useex.patch
|
Patch2: ksh-20070328-useex.patch
|
||||||
@ -67,6 +69,9 @@ install -m 644 share/lib/locale/$i/LC_MESSAGES/* \
|
|||||||
$RPM_BUILD_ROOT%{_datadir}/locale/$i/LC_MESSAGES/
|
$RPM_BUILD_ROOT%{_datadir}/locale/$i/LC_MESSAGES/
|
||||||
done
|
done
|
||||||
ln -sf /bin/ksh $RPM_BUILD_ROOT/usr/bin/ksh
|
ln -sf /bin/ksh $RPM_BUILD_ROOT/usr/bin/ksh
|
||||||
|
mkdir -p $RPM_BUILD_ROOT%{_sysconfdir}/skel
|
||||||
|
install -m 644 %{SOURCE4} $RPM_BUILD_ROOT%{_sysconfdir}/skel/.kshrc
|
||||||
|
install -m 644 %{SOURCE3} $RPM_BUILD_ROOT%{_sysconfdir}/kshrc
|
||||||
|
|
||||||
%post
|
%post
|
||||||
if [ ! -f /etc/shells ]; then
|
if [ ! -f /etc/shells ]; then
|
||||||
@ -100,11 +105,16 @@ fi
|
|||||||
/usr//bin/ksh
|
/usr//bin/ksh
|
||||||
%{_datadir}/locale/*/LC_MESSAGES/*
|
%{_datadir}/locale/*/LC_MESSAGES/*
|
||||||
%{_mandir}/man1/*
|
%{_mandir}/man1/*
|
||||||
|
%config(noreplace) %{_sysconfdir}/skel/.kshrc
|
||||||
|
%config(noreplace) %{_sysconfdir}/kshrc
|
||||||
|
|
||||||
%clean
|
%clean
|
||||||
rm -rf $RPM_BUILD_ROOT
|
rm -rf $RPM_BUILD_ROOT
|
||||||
|
|
||||||
%changelog
|
%changelog
|
||||||
|
* Tue Oct 21 2008 Michal Hlavinka <mhlavink@redhat.com> 20080202-4
|
||||||
|
- fix #467025 - Ksh fails to initialise environment when login from graphic console
|
||||||
|
|
||||||
* Wed Aug 06 2008 Tomas Smetana <tsmetana@redhat.com> 20080725-3
|
* Wed Aug 06 2008 Tomas Smetana <tsmetana@redhat.com> 20080725-3
|
||||||
- fix BuildRequires, rebuild
|
- fix BuildRequires, rebuild
|
||||||
|
|
||||||
|
25
kshrc.rhs
Normal file
25
kshrc.rhs
Normal file
@ -0,0 +1,25 @@
|
|||||||
|
#
|
||||||
|
# /etc/kshrc is sourced in interactive shells. It
|
||||||
|
# should contain commands to set up aliases, functions,
|
||||||
|
# options, key bindings, etc.
|
||||||
|
#
|
||||||
|
|
||||||
|
# Set prompts
|
||||||
|
#PROMPT='[%n@%m]%~%# ' # default prompt
|
||||||
|
#RPROMPT=' %~' # prompt for right side of screen
|
||||||
|
|
||||||
|
_src_etc_profile_d()
|
||||||
|
{
|
||||||
|
# from zshrc, with ksh fixes
|
||||||
|
if [[ ! -o login ]]; then # We're not a login shell
|
||||||
|
for i in /etc/profile.d/*.sh; do
|
||||||
|
if [ -r "$i" ]; then
|
||||||
|
. $i
|
||||||
|
fi
|
||||||
|
done
|
||||||
|
unset i
|
||||||
|
fi
|
||||||
|
}
|
||||||
|
_src_etc_profile_d
|
||||||
|
|
||||||
|
unset -f _src_etc_profile_d
|
Loading…
Reference in New Issue
Block a user