]> andersk Git - moira.git/blob - gen/printng.sh
get the right path to checkpc
[moira.git] / gen / printng.sh
1 #! /bin/sh
2 # $Id$
3
4 # The following exit codes are defined and MUST BE CONSISTENT with the
5 # error codes the library uses:
6 MR_MISSINGFILE=47836473
7 MR_MKCRED=47836474
8 MR_TARERR=47836476
9
10 PATH=/bin
11 TARFILE=/var/tmp/print.out
12 PCLOCAL=/etc/printcap.local
13 PCGEN=/etc/printcap.moira
14 PRINTCAP=/etc/printcap
15
16 # Alert if the tar file or other needed files do not exist
17 test -r $TARFILE || exit $MR_MISSINGFILE
18 test -r $PCLOCAL || exit $MR_MISSINGFILE
19
20 # Unpack the tar file, getting only files that are newer than the
21 # on-disk copies (-u).
22 cd /
23 tar xf $TARFILE || exit $MR_TARERR
24
25 # Build full printcap and spools
26 cat $PCLOCAL $PCGEN > $PRINTCAP
27 /usr/athena/etc/checkpc -f
28 /usr/athena/etc/lpc reread
29
30 # cleanup
31 test -f $TARFILE && rm -f $TARFILE
32 test -f $0 && rm -f $0
33
34 exit 0
35
This page took 0.045589 seconds and 5 git commands to generate.