3 # Called when a tape change is needed for a multi-file restore. Links the
4 # base filename to the next one in the ordered sequence of multi-files
7 delete($ENV{'SCRIPT_NAME'}); # force use of $0 to determine module
8 delete($ENV{'FOREIGN_MODULE_NAME'});
9 require './fsdump-lib.pl';
11 $ARGV[0] =~ /^(.*)\/([^\/]+)$/ || die "Missing filename";
15 # Find out where we are up to
16 $lnk = readlink($ARGV[0]);
17 if ($lnk =~ /^\Q$file\E\.(\d+)$/ && -r "$dir/$lnk" && !$ARGV[1]) {
19 $nxt = "$file.".($1 + 1);
23 -r $ARGV[0] && !-l $ARGV[0] &&
24 die "$ARGV[0] is not a link to the current archive!";
30 symlink($nxt, $ARGV[0]);