]> andersk Git - moira.git/blobdiff - gen/boot.sh
Command line printer manipulation client, and build goo.
[moira.git] / gen / boot.sh
index 41e12c778ecd8b55d87f33a0cff973b82df3577e..5ded8df1a2debdcc1e0d41950dc04a9f7c7fc098 100755 (executable)
@@ -1,13 +1,19 @@
 #! /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
 MR_MKCRED=47836474
 MR_TARERR=47836476
 
-PATH=...
+PATH=/usr/bin
 TARFILE=/var/tmp/boot.out
 BOOTGEN=/var/boot/bootptab.print
 BOOTLOCAL=/var/boot/bootptab.local
@@ -19,14 +25,11 @@ test -r $TARFILE || exit $MR_MISSINGFILE
 test -r $BOOTLOCAL || exit $MR_MISSINGFILE
 test -r $PSWDFILE || exit $MR_MISSINGFILE
 
-# Unpack the tar file, getting only files that are newer than the
-# on-disk copies (-u). When extracting files under /var/boot/hp,
-# tack on a .new so we can recognize them in the next step
 cd /
-pax -ru -s '|/var/boot/hp/.*$/&.new/' -f $TARFILE || exit $MR_TARERR
+tar xf $TARFILE || exit $MR_TARERR
 
 # Append passwords, etc., to the new files
-for f in find /var/boot/hp -name \*.new -print; do
+for f in `find /var/boot/hp -name \*.new -print`; do
     cat $PSWDFILE >> $f
     mv $f /var/boot/hp/`basename $f .new`
 done
@@ -34,11 +37,6 @@ done
 # Build full bootptab
 cat $BOOTLOCAL $BOOTGEN > $BOOTFILE
 
-# Signal bootpd? XXX
-
-# Remove out-of-date hp files
-find /var/boot/hp -mtime +1 -exec rm -f {} \;
-
 # cleanup
 test -f $TARFILE && rm -f $TARFILE
 test -f $0 && rm -f $0
This page took 0.034982 seconds and 4 git commands to generate.