Author: patrys                       Date: Wed Jun 25 11:58:19 2008 GMT
Module: SPECS                         Tag: HEAD
---- Log message:
- use LUA in %post

---- Files affected:
SPECS:
   pam.spec (1.286 -> 1.287) 

---- Diffs:

================================================================
Index: SPECS/pam.spec
diff -u SPECS/pam.spec:1.286 SPECS/pam.spec:1.287
--- SPECS/pam.spec:1.286        Wed Jun 25 13:35:23 2008
+++ SPECS/pam.spec      Wed Jun 25 13:58:14 2008
@@ -372,11 +372,15 @@
        rm -rf /var/lock/console
 fi
 
-%post
-if [ ! -a /var/log/tallylog ] ; then
-       # don't use coreutils here
-       (umask 177; :> /var/log/tallylog)
-fi
+%post -p <lua>
+fh, error = io.open("/var/log/tallylog")
+if file ~= nil then
+       io.close(fh)
+else
+       fh = io.open("/var/log/tallylog", "w+")
+       io.close(fh)
+       posix.chmod("/var/log/tallylog", "rw-------")
+end
 
 %post  libs -p /sbin/ldconfig
 %postun        libs -p /sbin/ldconfig
@@ -517,6 +521,9 @@
 All persons listed below can be reached at <cvs_login>@pld-linux.org
 
 $Log$
+Revision 1.287  2008/06/25 11:58:14  patrys
+- use LUA in %post
+
 Revision 1.286  2008/06/25 11:35:23  megabajt
 - add -D_GNU_SOURCE to DEFS; fixes lp#242867
 
================================================================

---- CVS-web:
    
http://cvs.pld-linux.org/cgi-bin/cvsweb.cgi/SPECS/pam.spec?r1=1.286&r2=1.287&f=u

_______________________________________________
pld-cvs-commit mailing list
[email protected]
http://lists.pld-linux.org/mailman/listinfo/pld-cvs-commit

Reply via email to