- unless ( $found ) {
- print STDERR "valid inputs to --templates are harddisk, single-tape, tape-changer or S3\n";
- &usage;
- exit 1;
-}
-# if tape-changer is chosen, check if mtx is installed
- if ($template eq "tape-changer") {
- my $ok = 0;
- for $dir ("/usr/sbin", "/usr/local/sbin", "/usr/local/bin", "/usr/bin", "/bin","/opt/csw/sbin",split(":",$oldPATH)) {
- if ( -e "$dir/mtx" ) {
- $ok = 1;
- last;
- }
- }
- unless ($ok) {
- &mprint ("ERROR: mtx binary not found, tape-changer template will not work and is not installed.\n");
- &log_and_die ("ERROR: Please install mtx and rerun the same command.\n", 0);
- }
- unless ($changerfile) {$changerfile="$confdir/$config/changer.conf";}
- open (CCONF, ">$changerfile")
- || &log_and_die ("ERROR: Cannot create $changerfile: $!\n", 1);
- close (CCONF);
- } elsif ($template eq "S3" ) {