From ee4033f9d3a605dc40b8bd88fd005ea894925464 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Elan=20Ruusam=C3=A4e?= Date: Wed, 25 Jun 2008 11:19:50 +0000 Subject: [PATCH] - partial /etc/shells edit with lua Changed files: bash.spec -> 1.186 --- bash.spec | 30 ++++++------------------------ 1 file changed, 6 insertions(+), 24 deletions(-) diff --git a/bash.spec b/bash.spec index 6a56133..043431d 100644 --- a/bash.spec +++ b/bash.spec @@ -44,7 +44,7 @@ BuildRequires: automake BuildRequires: bison BuildRequires: ncurses-devel >= 5.2 BuildRequires: readline-devel >= 5.2 -BuildRequires: rpmbuild(macros) >= 1.353 +BuildRequires: rpmbuild(macros) >= 1.429 BuildRequires: sed >= 4.0 BuildRequires: texinfo %if %{with static} @@ -275,35 +275,17 @@ else fi fi +# XXX need this in lua [ ! -x /usr/sbin/fix-info-dir ] || /usr/sbin/fix-info-dir -c %{_infodir} >/dev/null 2>&1 -%preun -if [ "$1" = "0" ]; then - umask 022 - grep -v /bin/bash /etc/shells | grep -v /bin/rbash > /etc/shells.new - mv -f /etc/shells.new /etc/shells -fi - -%post static -umask 022 -if [ ! -f /etc/shells ]; then - echo "/bin/bash.static" > /etc/shells -else - if ! grep -q '^/bin/bash.static$' /etc/shells; then - echo "/bin/bash.static" >> /etc/shells - fi -fi - -%preun static -if [ "$1" = "0" ]; then - umask 022 - grep -v /bin/bash.static /etc/shells > /etc/shells.new - mv -f /etc/shells.new /etc/shells -fi +%preun -p %remove_etc_shells -p /bin/bash /bin/rbash %postun -p /sbin/postshell -/usr/sbin/fix-info-dir -c %{_infodir} +%post static -p %add_etc_shells -p /bin/bash.static +%preun static -p %remove_etc_shells -p /bin/bash.static + %files -f %{name}.lang %defattr(644,root,root,755) %doc CHANGES NEWS README doc/{FAQ,INTRO} -- 2.43.0