+# $tapeid identifies the individual tape; $tapedesc is its current
+# identity and function, for printing in messages. You can make these
+# namespaces the same if you like, or you can make the tape.<tapeid>
+# files be links to tape.<tapedesc> files.
+if (defined($tapedesc= readlink "$etc/tape.$tapeid")) {
+ $tapedesc =~ s/^.*\.//;
+ $tapedesc .= "($tapeid)";
+} else {
+ $tapedesc = $tapeid;
+}
+
+# Parse the appropriate tape.nn file.
+# Format is: empty lines and lines starting '#' are ignored. Trailing
+# whitespace is ignored. File must end with 'end' on a line by itself.
+# Either there should be a line 'incremental' to indicate that this is
+# a tape for incremental backups, or a pair of lines 'filesystems fsg'
+# and 'next tapeid', indicating that this tape is part of a full
+# backup, containing the filesystem group fsg.