SPECS: bash.spec - %post also in lua

glen glen at pld-linux.org
Wed Jun 25 13:31:39 CEST 2008


Author: glen                         Date: Wed Jun 25 11:31:39 2008 GMT
Module: SPECS                         Tag: HEAD
---- Log message:
- %post also in lua

---- Files affected:
SPECS:
   bash.spec (1.186 -> 1.187) 

---- Diffs:

================================================================
Index: SPECS/bash.spec
diff -u SPECS/bash.spec:1.186 SPECS/bash.spec:1.187
--- SPECS/bash.spec:1.186	Wed Jun 25 13:19:50 2008
+++ SPECS/bash.spec	Wed Jun 25 13:31:33 2008
@@ -262,22 +262,8 @@
 %clean
 rm -rf $RPM_BUILD_ROOT
 
-%post
-umask 022
-if [ ! -f /etc/shells ]; then
-	echo "/bin/bash" > /etc/shells
-	echo "/bin/rbash" >> /etc/shells
-else
-	if ! grep -q '^/bin/bash$' /etc/shells; then
-		echo "/bin/bash" >> /etc/shells
-	fi
-	if ! grep -q '^/bin/rbash$' /etc/shells; then
-		echo "/bin/rbash" >> /etc/shells
-	fi
-fi
-
-# XXX need this in lua
-[ ! -x /usr/sbin/fix-info-dir ] || /usr/sbin/fix-info-dir -c %{_infodir} >/dev/null 2>&1
+%post	-p %add_etc_shells -p /bin/sh /bin/ksh
+os.execute("/usr/sbin/fix-info-dir -c %{_infodir} >/dev/null 2>&1")
 
 %preun	-p %remove_etc_shells -p /bin/bash /bin/rbash
 
@@ -324,6 +310,9 @@
 All persons listed below can be reached at <cvs_login>@pld-linux.org
 
 $Log$
+Revision 1.187  2008/06/25 11:31:33  glen
+- %post also in lua
+
 Revision 1.186  2008/06/25 11:19:50  glen
 - partial /etc/shells edit with lua
 
================================================================

---- CVS-web:
    http://cvs.pld-linux.org/cgi-bin/cvsweb.cgi/SPECS/bash.spec?r1=1.186&r2=1.187&f=u



More information about the pld-cvs-commit mailing list