#!/bin/sh
+# This is the driver script that actually runs backups.
cd /var/local/backup
PATH=/usr/local/lib/backup:$PATH export PATH
rm -f this-status p p2
echo 'FAILED to start dump script' >this-status
+# Here we go : run 'full', which (name notwithstanding) handles
+# both full and incremental backups, according to the ID of the
+# tape in the drive.
full 2>&1 | tee this-log
status=`cat this-status 2>/dev/null`
-cat <<END - this-log | /usr/lib/sendmail -oi -om -odq -t
-To: dump-reports
+# Mail a report to somewhere appropriate; -odq removed (means just
+# queue message, don't try to deliver) because it just delays the
+# message (you might want that if mail was one of the services turned
+# off for the duration of the backup, though).
+cat <<END - this-log | /usr/lib/sendmail -oi -om -t
+To: dump-reports@mnementh.local
Subject: Dump Report: $status
END
rm -f /TAPEID
+# Local hack for DAT drive on kuzuth: when done, eject the tape -- PMM
+mt rewoffl
+
if [ "x$1" != test ]; then
+ # Bring the system up as multiuser again
bringup
stty isig
fi