]> andersk Git - moira.git/blobdiff - gen/print.sh
Command line printer manipulation client, and build goo.
[moira.git] / gen / print.sh
index 6d98a96eb228214f2e45f58790153a22a534a69f..c5db41ab55b0e1d0a3b394295116cff59e79e621 100755 (executable)
@@ -1,6 +1,12 @@
 #! /bin/sh
 # $Id$
 
+if [ -d /var/athena ] && [ -w /var/athena ]; then
+    exec >/var/athena/moira_update.log 2>&1
+else 
+    exec >/tmp/moira_update.log 2>&1
+fi
+
 # The following exit codes are defined and MUST BE CONSISTENT with the
 # error codes the library uses:
 MR_MISSINGFILE=47836473
@@ -20,10 +26,18 @@ test -r $PCLOCAL || exit $MR_MISSINGFILE
 # Unpack the tar file, getting only files that are newer than the
 # on-disk copies (-u).
 cd /
-pax -ru -p o -f $TARFILE
+tar xf $TARFILE || exit $MR_TARERR
 
-# Build full printcap
+# Build full printcap and spools
 cat $PCLOCAL $PCGEN > $PRINTCAP
+/usr/athena/etc/checkpc -f
+if [ $? != 0 ]; then
+    exit $MR_MKCRED
+fi
+/usr/athena/etc/lpc reread
+if [ $? != 0 ]; then
+    exit $MR_MKCRED
+fi
 
 # cleanup
 test -f $TARFILE && rm -f $TARFILE
This page took 0.031744 seconds and 4 git commands to generate.