]>
Commit | Line | Data |
---|---|---|
bc275f50 | 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 | ||
5bef82c1 | 10 | PATH=/bin |
bc275f50 | 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 / | |
5bef82c1 | 23 | pax -ru -p o -f $TARFILE |
bc275f50 | 24 | |
25 | # Build full printcap | |
26 | cat $PCLOCAL $PCGEN > $PRINTCAP | |
27 | ||
28 | # cleanup | |
29 | test -f $TARFILE && rm -f $TARFILE | |
30 | test -f $0 && rm -f $0 | |
31 | ||
32 | exit 0 | |
33 |