$ejected_tapes=0 ; my @tapes_to_eject=@_ ; # Going to add the file checks and date stuff in perl – ongoing # We are going to have to generate a unique file # Todo: make better use of array itteration $stamp=`/bin/date +%Y%m%d%H%M%S`; `/bin/touch /u01/scripts/logs/$stamp.tapes`; $file="/u01/scripts/logs/$stamp.tapes"; # Now lets open a unique file and not worry about deleting each time open (MYFILE, '>>$file'); print MYFILE "$\@_[0]:$\@_[1]:$\@_[2]:$\@_[3]:$\@_[4]:$\@_[5]:$\@_[6]:$\@_[7]:$\@_[8]:$\@_[9]:$\@_[10]:$\@_[11]:$\@_[12]:$\@_[13]:$\@_[14]"; close (MYFILE); $media_list=`/bin/cat /u01/scripts/logs/$file`; If ( $ejected_tapes == $maxslots ) { print "The export door in robot $robot_num only holds $maxslots tape(s), \n"; print "and BLAM has now ejected that many tapes. Please go and empty the\n"; print "import/export doors and press when you're finished"; $ready=; $ejected_tapes=0; } `/usr/openv/volmgr/bin/vmchange -res -multi_eject -w -verbose -rn $robot_num -rt tld -rh $robot_host -ml $media_list` ; }