spec: add /bin/{tcsh,csh} to /etc/shells

This commit is contained in:
Fridolin Pokorny 2015-06-09 14:06:17 +02:00
parent 2a7c9661bb
commit 1f68694387
1 changed files with 13 additions and 2 deletions

View File

@ -1,7 +1,7 @@
Summary: An enhanced version of csh, the C shell
Name: tcsh
Version: 6.18.01
Release: 13%{?dist}
Release: 14%{?dist}
License: BSD
Group: System Environment/Shells
Source: http://ftp.funet.fi/pub/unix/shells/tcsh/%{name}-%{version}.tar.gz
@ -110,19 +110,27 @@ 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
%postun
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
@ -136,6 +144,9 @@ fi
%changelog
* Tue Jun 09 2015 Fridolin Pokorny <fpokorny@redhat.com> - 6.18.01-14
- Add /bin/tcsh and /bin/csh to /etc/shells (#1229032)
* Tue Jan 27 2015 Pavel Raiskup <praiskup@redhat.com> - 6.18.01-13
- fix 'wait' built-in hang (#1181685)
- call %%autosetup after iconv, this avoids having uncommitted changes in