[dash/f14] Try to add dash to /etc/shells every time, not just on new installs (#706138)
Petr Sabata
psabata at fedoraproject.org
Mon May 23 07:06:34 UTC 2011
commit 128bd3afe17099cc06e5bdc4d819ab00f12de87a
Author: Petr Sabata <psabata at redhat.com>
Date: Mon May 23 09:06:16 2011 +0200
Try to add dash to /etc/shells every time, not just on new installs (#706138)
dash.spec | 12 +++++++-----
1 files changed, 7 insertions(+), 5 deletions(-)
---
diff --git a/dash.spec b/dash.spec
index 22c239d..ae1c17d 100644
--- a/dash.spec
+++ b/dash.spec
@@ -1,6 +1,6 @@
Name: dash
Version: 0.5.6
-Release: 3%{?dist}
+Release: 4%{?dist}
Summary: Small and fast POSIX-compliant shell
Group: System Environment/Shells
License: BSD
@@ -26,13 +26,11 @@ mv %{buildroot}%{_bindir}/dash %{buildroot}/bin/
rm -rf %{buildroot}%{_bindir}/
%post
-if [ $1 -eq 1 ]; then
- grep -qF /bin/dash /etc/shells || echo '/bin/dash' >> /etc/shells
-fi
+grep -qF '^/bin/dash$' /etc/shells || echo '/bin/dash' >> /etc/shells
%postun
if [ $1 -eq 0 ]; then
- sed -i '/\/bin\/dash/d' /etc/shells
+ sed -i '/^\/bin\/dash$/d' /etc/shells
fi
%files
@@ -41,6 +39,10 @@ fi
%{_datadir}/man/man1/dash.1.gz
%changelog
+* Mon May 23 2011 Petr Sabata <psabata at redhat.com> - 0.5.6-4
+- Try to add dash to /etc/shells every time, not just on new installs (#706138)
+- Also, make the grep regexps a bit more strict, just to be sure
+
* Thu May 19 2011 Petr Sabata <psabata at redhat.com> - 0.5.6-3
- Install/remove dash from /etc/shells (#706138)
- Buildroot and defattr cleanup
More information about the scm-commits
mailing list