spec: add /bin/{tcsh,csh} to /etc/shells
This commit is contained in:
parent
ea63b1ce0e
commit
4d36648f3f
14
tcsh.spec
14
tcsh.spec
@ -1,7 +1,7 @@
|
||||
Summary: An enhanced version of csh, the C shell
|
||||
Name: tcsh
|
||||
Version: 6.19.00
|
||||
Release: 2%{?dist}
|
||||
Release: 3%{?dist}
|
||||
License: BSD
|
||||
Group: System Environment/Shells
|
||||
Source: ftp://ftp.astron.com/pub/tcsh/%{name}-%{version}.tar.gz
|
||||
@ -97,12 +97,18 @@ rm -rf $RPM_BUILD_ROOT
|
||||
%post
|
||||
if [ ! -f /etc/shells ]; then
|
||||
echo "%{_bindir}/tcsh" >> /etc/shells
|
||||
echo "/bin/tcsh" >> /etc/shells
|
||||
echo "%{_bindir}/csh" >> /etc/shells
|
||||
echo "/bin/csh" >> /etc/shells
|
||||
else
|
||||
grep -q '^%{_bindir}/tcsh$' /etc/shells || \
|
||||
echo "%{_bindir}/tcsh" >> /etc/shells
|
||||
grep -q '^/bin/tcsh$' /etc/shells || \
|
||||
echo "/bin/tcsh" >> /etc/shells
|
||||
grep -q '^%{_bindir}/csh$' /etc/shells || \
|
||||
echo "%{_bindir}/csh" >> /etc/shells
|
||||
grep -q '^/bin/csh$' /etc/shells || \
|
||||
echo "/bin/csh" >> /etc/shells
|
||||
fi
|
||||
|
||||
|
||||
@ -110,6 +116,9 @@ fi
|
||||
if [ ! -x %{_bindir}/tcsh ]; then
|
||||
grep -v '^%{_bindir}/tcsh$' /etc/shells | \
|
||||
grep -v '^%{_bindir}/csh$' > /etc/shells.rpm && \
|
||||
grep -v '^/bin/tcsh$' /etc/shells | \
|
||||
grep -v '^%{_bindir}/csh$' | \
|
||||
grep -v '^/bin/csh$' > /etc/shells.rpm && \
|
||||
mv /etc/shells.rpm /etc/shells
|
||||
fi
|
||||
|
||||
@ -123,6 +132,9 @@ fi
|
||||
|
||||
|
||||
%changelog
|
||||
* Tue Jun 16 2015 Fridolin Pokorny <fpokorny@redhat.com> - 6.19.00-03
|
||||
- Add /bin/tcsh and /bin/csh to /etc/shells (#1229032)
|
||||
|
||||
* Thu May 28 2015 Fridolin Pokorny <fpokorny@redhat.com> - 6.19.00-02
|
||||
- Add tcsh-6.19.00-gcc5-calloc.patch to avoid crashes and infinite loops due to
|
||||
gcc-5 malloc+memset optimization.
|
||||
|
Loading…
Reference in New Issue
Block a user