add /usr/bin/ksh to /etc/shells (#1381113)

This commit is contained in:
Michal Hlavinka 2017-03-10 13:09:15 +01:00
parent 04e570f16f
commit 6774b6d30e

View File

@ -9,7 +9,7 @@ Group: System Environment/Shells
#CPL everywhere else (for KSH itself) #CPL everywhere else (for KSH itself)
License: CPL License: CPL
Version: %{releasedate} Version: %{releasedate}
Release: 31%{?dist} Release: 32%{?dist}
Source0: http://www.research.att.com/~gsf/download/tgz/ast-ksh.%{release_date}.tgz Source0: http://www.research.att.com/~gsf/download/tgz/ast-ksh.%{release_date}.tgz
Source1: http://www.research.att.com/~gsf/download/tgz/INIT.%{release_date}.tgz Source1: http://www.research.att.com/~gsf/download/tgz/INIT.%{release_date}.tgz
Source2: kshcomp.conf Source2: kshcomp.conf
@ -320,10 +320,14 @@ fi
%post %post
if [ ! -f /etc/shells ]; then if [ ! -f /etc/shells ]; then
echo "/bin/ksh" > /etc/shells echo "/bin/ksh" > /etc/shells
echo "/usr/bin/ksh" >> /etc/shells
else else
if ! grep -q '^/bin/ksh$' /etc/shells ; then if ! grep -q '^/bin/ksh$' /etc/shells ; then
echo "/bin/ksh" >> /etc/shells echo "/bin/ksh" >> /etc/shells
fi fi
if ! grep -q '^/usr/bin/ksh$' /etc/shells ; then
echo "/usr/bin/ksh" >> /etc/shells
fi
fi fi
/bin/systemctl try-restart systemd-binfmt.service >/dev/null 2>&1 || : /bin/systemctl try-restart systemd-binfmt.service >/dev/null 2>&1 || :
@ -332,6 +336,9 @@ fi
if [ ! -f /bin/ksh ]; then if [ ! -f /bin/ksh ]; then
sed -i '/^\/bin\/ksh$/ d' /etc/shells sed -i '/^\/bin\/ksh$/ d' /etc/shells
fi fi
if [ ! -f /usr/bin/ksh ]; then
sed -i '/^\/usr\/bin\/ksh$/ d' /etc/shells
fi
%verifyscript %verifyscript
echo -n "Looking for ksh in /etc/shells... " echo -n "Looking for ksh in /etc/shells... "
@ -357,6 +364,9 @@ fi
rm -rf $RPM_BUILD_ROOT rm -rf $RPM_BUILD_ROOT
%changelog %changelog
* Fri Mar 10 2017 Michal Hlavinka <mhlavink@redhat.com> - 20120801-32
- add /usr/bin/ksh to /etc/shells (#1381113)
* Fri Mar 03 2017 Michal Hlavinka <mhlavink@redhat.com> - 20120801-31 * Fri Mar 03 2017 Michal Hlavinka <mhlavink@redhat.com> - 20120801-31
- use latest set of patches - use latest set of patches