]> Dogcows Code - chaz/tar/blobdiff - scripts/dump-remind.in
Update copyright years.
[chaz/tar] / scripts / dump-remind.in
index 338fd0dea1b883099877b2ecdb0821380a2ffb7c..f9a299b5a14d8b5dca8c7350b54981fe7204c677 100644 (file)
@@ -2,14 +2,30 @@
 # This file is included in the GNU tar distribution as an example.  It is
 # not used by default unless the proper line is uncommented in backup-specs.
 # System administrators will probably want to customize this and
-# backup-specs for their site. 
+# backup-specs for their site.
 #
 # This script should be run by tar with --info-script (-F) to inform
 # interested parties that a tape for the next volume of the backup needs to
-# be put in the tape drive. 
-#
+# be put in the tape drive.
+
+# Copyright 2004-2005, 2010, 2012-2014 Free Software Foundation, Inc.
+
+# This file is part of GNU tar.
+
+# GNU tar is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 3 of the License, or
+# (at your option) any later version.
 
-# Include location of `sendmail' and GNU finger. 
+# GNU tar is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+# GNU General Public License for more details.
+
+# You should have received a copy of the GNU General Public License
+# along with this program.  If not, see <http://www.gnu.org/licenses/>.
+
+# Include location of 'sendmail' and GNU finger.
 PATH="/usr/lib:/usr/local/gnubin:${PATH}"
 export PATH
 
@@ -20,19 +36,14 @@ SYSCONFDIR=${SYSCONFDIR-@sysconfdir@}
 MT_REWIND
 MT_OFFLINE
 
-volno="`cat \"${VOLNO_FILE}\" 2> /dev/null`"
-if [ $? -ne 0 ]; then
-   volno=0
-fi
-
 # Get a list of people to whom to mail a request for changing the tape.
 # This egregious nightmare parses the output from GNU finger which shows
 # which users are logged into consoles (and thus in the office and capable
 # of changing tapes).
 #
-# Certain users (like `root') aren't real users, and shouldn't be notified.
-# Neither should `zippy', `elvis', etc. (on the GNU machines) since they're
-# just test accounts. 
+# Certain users (like 'root') aren't real users, and shouldn't be notified.
+# Neither should 'zippy', 'elvis', etc. (on the GNU machines) since they're
+# just test accounts.
 recipients="`
     finger .clients 2> /dev/null \
      | sed -ne '
@@ -71,34 +82,34 @@ sendmail -oi -t << __EOF__
 From: `basename $0` (backup tape-changing reminder)
 To: ${recipients}
 Cc: ${ADMINISTRATOR}
-Subject: Backup needs new tape for volume ${volno}
+Subject: Backup needs new tape for volume ${TAR_VOLUME}
 Reply-To: ${ADMINISTRATOR}
 
-This is an automated report from the backup script running on 
-`hostname`. 
+This is an automated report from the backup script running on
+`hostname`.
 
-Volume ${volno} 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.
+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 "\aPlease put volume ${volno} in tape drive and press RETURN"
+echo "\aPlease put volume ${TAR_VOLUME} in tape drive and press RETURN"
 read input
-echo "Writing volume ${volno}..."
+echo "Writing volume ${TAR_VOLUME}..."
 
 sendmail -oi -t << __EOF__
 From: `basename $0` (backup tape-changing reminder)
 To: ${recipients}
 Cc: ${ADMINISTRATOR}
-Subject: Volume ${volno} for backup has been added
+Subject: Volume ${TAR_VOLUME} for backup has been added
 Reply-To: ${ADMINISTRATOR}
 
-This is an automated report from the backup script running on 
-`hostname`. 
+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__
This page took 0.025805 seconds and 4 git commands to generate.