123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103 |
- PATH="/usr/lib:/usr/local/gnubin:${PATH}"
- export PATH
- SYSCONFDIR=${SYSCONFDIR-@sysconfdir@}
- . ${LIBPATH-@libexecdir@}/backup.sh
- MT_REWIND
- MT_OFFLINE
- recipients="`
- finger .clients 2> /dev/null \
- | sed -ne '
- 1{
- /clientstatus: file has not changed in/{
- n;n;n;n;d
- }
- n;n;d
- }
- s/^..................................................//
- $!{/^$/d
- /^root?*$/d
- /^zippy$/d
- /^fnord$/d
- /^elvis$/d
- /^snurd$/d
- H
- }
- ${g
- : 1
- s/\(\n\)\([A-Za-z0-9_][A-Za-z0-9_]*\)\(\n.*\)\2\(.*\)/\1\2\3\4/g
- s/\n$//g
- t 1
- s/^\n//
- s/\n$//g
- s/\n/, /g
- : 2
- s/, ,/,/g
- t 2
- p
- }'`"
- sendmail -oi -t << __EOF__
- From: `basename $0` (backup tape-changing reminder)
- To: ${recipients}
- Cc: ${ADMINISTRATOR}
- Subject: Backup needs new tape for volume ${TAR_VOLUME}
- Reply-To: ${ADMINISTRATOR}
- This is an automated report from the backup script running on
- `hostname`.
- Volume ${TAR_VOLUME} of the backup needs to be put in the tape drive.
- Usually whoever prepared the backup leaves labeled tapes on top of the
- drive itself. If there aren't any more, information about where to find
- tapes and how to label them are posted on the wall by apple-gunkies
- (unhelpfully obscured by a bookshelf). An online copy (which is probably
- more up-to-date) can also be found in ~friedman/etc/fsf/backup.how.
- __EOF__
- echo "Please put volume ${TAR_VOLUME} in tape drive and press RETURN"
- read input
- echo "Writing volume ${TAR_VOLUME}..."
- sendmail -oi -t << __EOF__
- From: `basename $0` (backup tape-changing reminder)
- To: ${recipients}
- Cc: ${ADMINISTRATOR}
- Subject: Volume ${TAR_VOLUME} for backup has been added
- Reply-To: ${ADMINISTRATOR}
- This is an automated report from the backup script running on
- `hostname`.
- The backup has been continued, so for now no further attention is required.
- __EOF__
- exit 0
|