]> andersk Git - moira.git/blobdiff - gen/acl.sh
Don't output seperate lines for each sublist.
[moira.git] / gen / acl.sh
index 61390c6240c202d5280ba00ed03db3fb767cf3c9..f1c154a247ce3eebcbb9b88becfe13d93b790327 100755 (executable)
@@ -8,6 +8,7 @@ fi
 
 # The following exit codes are defined and MUST BE CONSISTENT with the
 # error codes the library uses:
+MR_NOCRED=47836470
 MR_MISSINGFILE=47836473
 MR_MKCRED=47836474
 MR_TARERR=47836476
@@ -16,13 +17,15 @@ status=0
 
 PATH=/bin:/usr/bin
 TARFILE=/var/tmp/acl.out
+SRCDIR=/var/tmp/acltmp
 
 # Alert if the tar file does not exist
 test -r $TARFILE || exit $MR_MISSINGFILE
 
 # Make a temporary directory to unpack the tar file into
-mkdir /var/tmp/acltmp || exit $MR_MKCRED
-cd /var/tmp/acltmp || exit $MR_MKCRED
+rm -rf $SRCDIR
+mkdir $SRCDIR || exit $MR_MKCRED
+cd $SRCDIR || exit $MR_MKCRED
 tar xpf $TARFILE || exit $MR_TARERR
 
 # Copy over each file which is new or has changed
@@ -82,9 +85,17 @@ for file in `find . -type f -print | sed -e 's/^\.//'`; do
     fi
 done
 
+# Test if a site-specific post dcm script exists, and run it if it does
+if [ -x /etc/athena/postacldcm ]; then
+    /etc/athena/postacldcm >/dev/null 2>&1
+    if [ $? != 0 ]; then
+       exit $MR_NOCRED
+    fi
+fi
+
 # cleanup
 cd /
-rm -rf /var/tmp/acltmp
+rm -rf $SRCDIR
 test -f $TARFILE && rm -f $TARFILE
 test -f $0 && rm -f $0
 
This page took 0.037557 seconds and 4 git commands to generate.