@output /dev/null
messages
@$out ${cwd}/tmp/log1.out
-setdebug level=100 storage=File
label storage=File volume=FileVolume001 Pool=Default
label storage=DiskChanger volume=ChangerVolume001 slot=1 Pool=Full drive=0
label storage=DiskChanger volume=ChangerVolume002 slot=2 Pool=Full drive=0
@$out $cwd/tmp/log10.out
setdebug level=1 director
sql
-SELECT JobId, Level, JobTDate, StartTime, EndTime, Type FROM Job ORDER BY JobId;
+SELECT JobId, Name, Level, JobTDate, StartTime, EndTime, Type FROM Job ORDER BY JobId;
list jobs
prune jobs yes
list jobs
sql
-SELECT JobId, Level, JobTDate, StartTime, EndTime, Type FROM Job ORDER BY JobId;
+SELECT JobId, Name, Level, JobTDate, StartTime, EndTime, Type FROM Job ORDER BY JobId;
@$out $cwd/tmp/log11.out
sql
# So, we get it from the job list to exclude it and build the check_prune_list
id=`awk '/ [0-9] / { print $2 }' $tmp/log11.out`
+if [ "$id" = "" ]; then
+ print_debug "ERROR: Unable to determine the id in $tmp/log11.out"
+ estat=1
+fi
+
jobid=1
-for i in `seq 2 9`
+for i in `seq 2 7`
do
- if [ $i != $id ]; then
+ if [ "$i" != "$id" ]; then
jobid="$jobid,$i"
fi
done