4 # The following exit codes are defined and MUST BE CONSISTENT with the
5 # error codes the library uses:
6 MR_MISSINGFILE=47836473
11 TARFILE=/var/tmp/boot.out
12 BOOTGEN=/var/boot/bootptab.print
13 BOOTLOCAL=/var/boot/bootptab.local
14 BOOTFILE=/var/boot/bootptab
15 PSWDFILE=/var/boot/hp.add
17 # Alert if the tar file or other needed files do not exist
18 test -r $TARFILE || exit $MR_MISSINGFILE
19 test -r $BOOTLOCAL || exit $MR_MISSINGFILE
20 test -r $PSWDFILE || exit $MR_MISSINGFILE
22 # Unpack the tar file, getting only files that are newer than the
23 # on-disk copies (-u). When extracting files under /var/boot/hp,
24 # tack on a .new so we can recognize them in the next step
26 pax -ru -s '|/var/boot/hp/.*$/&.new/' -f $TARFILE || exit $MR_TARERR
28 # Append passwords, etc., to the new files
29 for f in find /var/boot/hp -name \*.new -print; do
31 mv $f /var/boot/hp/`basename $f .new`
35 cat $BOOTLOCAL $BOOTGEN > $BOOTFILE
39 # Remove out-of-date hp files
40 find /var/boot/hp -mtime +1 -exec rm -f {} \;
43 test -f $TARFILE && rm -f $TARFILE
44 test -f $0 && rm -f $0