]> git.pld-linux.org Git - packages/bash.git/commitdiff
- partial /etc/shells edit with lua
authorElan Ruusamäe <glen@pld-linux.org>
Wed, 25 Jun 2008 11:19:50 +0000 (11:19 +0000)
committercvs2git <feedback@pld-linux.org>
Sun, 24 Jun 2012 12:13:13 +0000 (12:13 +0000)
Changed files:
    bash.spec -> 1.186

bash.spec

index 6a561336e19d4fad8143a7fd756ab45f1500942a..043431d79896c6c5926b3239a0508cf058f39393 100644 (file)
--- 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}
This page took 0.059927 seconds and 4 git commands to generate.