source: trunk/DataCheck/Sourcefile.sh@ 18807

Last change on this file since 18807 was 18784, checked in by Daniela Dorner, 8 years ago
adapted to convention of current night used in Step1.sh
  • Property svn:executable set to *
File size: 21.5 KB
Line 
1#!/bin/bash
2
3# to treat aliases in bash-script correctly
4shopt -s expand_aliases
5
6# check if script has been started with absolute path
7if ! dirname $0 | grep -E '^/' >/dev/null 2>&1
8then
9 echo "Please start your script with an absolute path."
10 exit
11fi
12
13if [ "$AUTOMATIONSETUP" = "" ]
14then
15 echo "Please set the environment variable \$AUTOMATIONSETUP."
16 exit
17fi
18
19if [ "$SOURCEFILEPATH" = "" ]
20then
21 export SOURCEFILEPATH=`dirname $0`
22fi
23if [ "$SCRIPTNAME" = "" ]
24then
25 SCRIPTNAME=`basename $0`
26fi
27
28source $SOURCEFILEPATH/../Setup/setup.$AUTOMATIONSETUP
29
30if [ "$mars" = "" ]
31then
32 echo "Please set the path for MARS."
33 exit
34fi
35
36datetime=`date +%F-%H-%M-%S`
37
38if [ "$transferdelay" = "" ]
39then
40 # setup where immediate report of problem is needed, i.e. mainly LP
41 checknight=`date +%Y%m%d --date="-19HOUR"`
42else
43 # any setup where transfer might cause a delay in arrival of files
44 checknight=`date +%Y%m%d --date="-${transferdelay}day"`
45fi
46
47# function to make sure that a directory is made
48function makedir()
49{
50 if [ ! -d $@ ]
51 then
52 if [ "$processlog" = "" ] || [ "$logfile" = "" ]
53 then
54 mkdir -p $@
55 else
56 mkdir -pv $@
57 fi
58 if [ ! -d $@ ]
59 then
60 if ! [ "$processlog" = "" ]
61 then
62 echo `date +%F\ %T`" "`whoami`"@"$HOSTNAME" "$SCRIPTNAME"["$$"] ERROR could not make dir "$@ >> $processlog
63 else
64 echo "could not make dir "$@
65 fi
66 if ls $lockfile >/dev/null 2>&1
67 then
68 rm -v $lockfile
69 fi
70 exit
71 fi
72 fi
73}
74
75# logging paths for runlogs and processlog
76runlogpath=$logpath/run/`date +%Y/%m/%d`
77processlogpath=$logpath/processlog
78makedir $runlogpath
79makedir $processlogpath
80processlog=$processlogpath/process`date +%F`.log
81
82makedir $lockpath
83
84
85# function to provide proper logging in a single logfile ($processlog)
86function printprocesslog
87{
88 makedir $processlogpath
89 echo `date +%F\ %T`" "`whoami`"@"$HOSTNAME" "$SCRIPTNAME"["$$"] "$@ >> $processlog
90}
91
92# function to exit a script properly
93function finish()
94{
95 if ! [ "$lockfile" = "" ] && ls $lockfile >/dev/null 2>&1
96 then
97 printprocesslog "DEBUG " `rm -v $lockfile`
98 fi
99 printprocesslog "DEBUG finished "$SOURCEFILEPATH"/"$SCRIPTNAME
100 # fixme: handle different cases - sometimes exit of script is needed, sometimes only continue
101 exit
102}
103
104
105# set checkvalue to ok at the beginning of the scripts
106check="ok"
107
108# setup for jobmanager:
109# log files (can't be defined in script itself, as script can run longer
110# than one day
111jmerrorlog=$runlogpath/jobmanager-`whoami`-$HOSTNAME-$AUTOMATIONSETUP-`date +%F`-error.log
112jmscriptlog=$runlogpath/jobmanager-`whoami`-$HOSTNAME-$AUTOMATIONSETUP-`date +%F`.log
113
114# check if rc-files are available
115if ! ls $steps >/dev/null
116then
117 echo "Can't find steps.rc ($steps)"
118 finish
119fi
120if ! ls $sqlrc >/dev/null 2>&1 || [ "$sqlrc" = "" ]
121then
122 echo "Can't find sql.rc ($sqlrc)"
123 finish
124fi
125
126# resetting values for jobmanager
127pno=0
128totalpno=0
129running=0
130queued=0
131runningscript=0
132queuedscript=0
133stillinqueue=0
134
135
136# alias (we cannot check the beginning of the line due to
137# color codes in filldotraw.C)
138alias 'intgrep'='grep -E -o \\\("(int|Bool_t)"\\\)[0-9]+$ | grep -E -o [0-9]+'
139
140
141# in the following the functions, which are needed by several scripts, are
142# defined
143
144# function to check if a process is already locked
145# command line option can be used to execute something, e.g. 'continue'
146function checklock()
147{
148 if ! echo `date +%F\ %T`" "`whoami`"@"$HOSTNAME" "$SCRIPTNAME"["$$"] "`uname -a` > $lockfile 2>/dev/null
149 then
150 if find $lockfile -amin -5
151 then
152 printprocesslog "INFO lockfile $lockfile exists"
153 else
154 printprocesslog "WARN lockfile $lockfile exists"
155 fi
156 $@
157 exit
158 else
159 printprocesslog "DEBUG created lockfile $lockfile"
160 fi
161}
162
163# print the current status values
164function printstatusvalues()
165{
166 echo "the current values are:"
167 echo " starttime=$starttime"
168 echo " stoptime=$stoptime"
169 echo " availtime=$availtime"
170 echo " returncode=$returncode"
171 echo "-- check: -$check-"
172 echo ""
173}
174
175# get the db-setup from the sql.rc
176function getdbsetup()
177{
178 db=`grep Database $sqlrc | grep -v '#' | sed -e 's/Database: //' -e 's/ //g'`
179 pw="--password="`grep Password $sqlrc | grep -v '#' | sed -e 's/Password: //' -e 's/ //g'`
180 us=`grep User $sqlrc | grep -v '#' | sed -e 's/User: //' -e 's/ //g'`
181 ho=`grep URL $sqlrc | grep -v '#' | sed -e 's/ //g' -e 's/URL:mysql:\/\///'`
182 if [ "$sqlpw" != "" ]
183 then
184 sqlpwfile="--defaults-file=$sqlpw"
185 pw=""
186 fi
187# echo "setup: "
188# echo " db: "$db
189# echo " pw: "$pw
190# echo " us: "$us
191# echo " ho: "$ho
192}
193
194# function to send a mysql query
195function sendquery()
196{
197 getdbsetup
198 printprocesslog "DEBUG sendquery QUERY: "$query
199 val=`mysql $sqlpwfile -s -u $us $pw --host=$ho $db -e " $query " 2>&1`
200 checkmysql=`echo $?`
201 if [ $checkmysql -gt 0 ]
202 then
203 printprocesslog "ERROR could not query DB "$db" on host "$ho" with user "$us" (program: $program, function sendquery) "
204 printprocesslog "MYSQLERROR [returncode: "$checkmysql"] "$val
205 error=`echo $val | grep -E -o 'ERROR [1-9]{1,4}' | grep -E -o '[1-9]{1,4}'`
206 # here possible reaction to mysql error
207 if [ $error -eq 1213 ]
208 then
209 printprocesslog "WARN Deadlock found. Should resend query."
210 printprocesslog "DEBUG sendquery QUERY: [2nd try] "$query
211 val=`mysql $sqlpwfile -s -u $us $pw --host=$ho $db -e " $query " 2>&1`
212 checkmysql2=`echo $?`
213 if [ $checkmysql2 -gt 0 ]
214 then
215 printprocesslog "ERROR could not query DB "$db" on host "$ho" with user "$us" (program: $program, function sendquery) [2nd try]"
216 printprocesslog "MYSQLERROR [returncode: "$checkmysql"] "$val" [2nd try]"
217 error2=`echo $val | grep -E -o 'ERROR [1-9]{1,4}' | grep -E -o '[1-9]{1,4}'`
218 val=
219 finish
220 else
221 if [ "$val" = "NULL" ]
222 then
223 val=
224 fi
225 echo $val
226 return 0
227 fi
228 fi
229 val=
230 finish
231 else
232 warning=`echo $val | grep -o -E 'mysql: \[Warning\]'`
233 if [ "$warning" != "" ]
234 then
235 printprocesslog "WARN possible problem to query DB "$db" on host "$ho" with user "$us" (program: $program, function sendquery) "
236 printprocesslog "MYSQLWARN [returncode: "$checkmysql"] "$val
237 val=
238 finish
239 fi
240 fi
241 if [ "$val" = "NULL" ]
242 then
243 val=
244 fi
245 echo $val
246 return 0
247}
248
249# function to get information from the setupfile $steps
250function getfromsetup()
251{
252 grep $1"[.]"$2":" $steps | grep -v '#' | sed -e "s/$1[.]$2://"
253}
254
255# function to get the needed information from the dependencies-file steps.rc
256function getstepinfo()
257{
258 getdbsetup
259 needs=( `getfromsetup $step "Needs"` )
260 noderestricted=`getfromsetup $step "NodeRestricted"`
261 prims=( `getfromsetup $step "Primaries"` )
262 maintable=`getfromsetup $step "MainTable" | sed -e "s/\ //g"`
263 sort=`getfromsetup $step "SortDirection" | sed -e "s/\ //g"`
264# echo " maintable: "$maintable
265# echo " needs: "${needs[@]}
266# echo " noderestricted: "$noderestricted
267# echo " prims: "${prims[@]}
268}
269
270# function to get the joins needed for the get/set status queries
271function getalljoins()
272{
273 # add table
274 query=$query" "$maintable"Status"
275 # add special join
276 query=$query" "`getfromsetup $maintable "SpecialJoin"`
277 # add join for step unless step is the same as maintable
278 if ! [ "$step" = "$maintable" ]
279 then
280 query=$query" LEFT JOIN "$step"Status USING("${prims[@]}") "
281 fi
282 # add joins for influences or needs
283 for otherstep in ${othersteps[@]}
284 do
285 if ! [ "$otherstep" = "$maintable" ]
286 then
287 query=$query" LEFT JOIN "$otherstep"Status USING("`getfromsetup $otherstep "Primaries"`") "
288 fi
289 done
290}
291
292# function to create the middle part of a query
293# which is identical for the functions getstatus() and gettodo()
294function getstatusquery()
295{
296 # add from which table the information is queried
297 query=$query" FROM "
298 othersteps=${needs[@]}
299 getalljoins
300 # add condition
301 query=$query" WHERE "
302 # add condition for step, i.e. step is not yet done
303 query=$query" ISNULL("$step"Status.fStartTime) "
304 query=$query" AND ISNULL("$step"Status.fStopTime) "
305 query=$query" AND ISNULL("$step"Status.fAvailable) "
306 query=$query" AND ISNULL("$step"Status.fReturnCode) "
307 # add requirement for production host in case it is needed
308 if [ "$1 " != " " ]
309 then
310 query=$query" AND fProductionHostKEY=$2 "
311 fi
312 query=$query`getfromsetup $step "SpecialWhere"`
313 # add condition for needs, i.e. that step is done
314 for (( k=0 ; k < ${#needs[@]} ; k++ ))
315 do
316# if [ $k -eq 0 ]
317# then
318# query=$query" HAVING "
319# else
320 query=$query" AND "
321# fi
322# query=$query" COUNT(*)=COUNT(IF("
323 query=$query" NOT ISNULL("${needs[$k]}"Status.fStartTime) "
324 query=$query" AND NOT ISNULL("${needs[$k]}"Status.fStopTime) "
325 query=$query" AND NOT ISNULL("${needs[$k]}"Status.fAvailable) "
326 query=$query" AND ISNULL("${needs[$k]}"Status.fReturnCode) "
327# query=$query" , 1, NULL)) "
328 done
329# if ! echo $query | grep UPDATE >/dev/null 2>&1
330# then
331# query=$query" GROUP BY "${prims[@]}
332# fi
333}
334
335# function to get todolist
336# returns the next or the list of next steps
337function gettodo()
338{
339 # reset the variable for the number of the next step
340 process=
341 printprocesslog "DEBUG getting todo for step $step..."
342 getstepinfo
343 # get query
344 query=" SELECT "${prims[@]}
345 getstatusquery $2
346 # order by priority to the the number of the next step to be done
347 query=$query" ORDER BY "$step"Status.fPriority "
348 if [ "$sort" = "" ]
349 then
350 query=$query" DESC "
351 else
352 query=$query" "$sort
353 fi
354 # add limitation in case only one or a limited number of
355 # processes should be executed
356 if [ "$1 " != " " ]
357 then
358 query=$query" limit 0, $1 "
359 fi
360 # print query
361 #printprocesslog "DEBUG gettodo for step $step QUERY: "$query
362 # execute query
363 process=`sendquery`
364 #if ! process=`mysql -s -u $us --password=$pw --host=$ho $db -e " $query "`
365 #then
366 # printprocesslog "ERROR could not query processes from db (program: $program, function gettodo)"
367 # finish
368 #fi
369 # get numbers of next step from mysql result
370 if [ "$process" = "" ]
371 then
372 printprocesslog "DEBUG => nothing to do"
373 finish
374 else
375 primaries=( $process )
376 num=`expr ${#primaries[@]} / ${#prims[@]} `
377 fi
378}
379
380# function to get the number of processes which still have to be done
381function getstatus()
382{
383 printprocesslog "DEBUG getstatus for step "$step
384 # reset the variable for the number of steps to be done
385 numproc=0
386 getstepinfo
387 # get query
388 query=" SELECT "${prims[@]}
389 getstatusquery $1
390 # print query
391 #printprocesslog "DEBUG getstatus for step $step QUERY: "$query
392 # execute query
393 #numproc=`sendquery `#cannot be done with sendquery, because of row counting
394 if ! numproc=`mysql $sqlpwfile -s -u $us $pw --host=$ho $db -e " $query " | wc -l`
395 then
396 printprocesslog "ERROR could not query number of processes from db (program: $program, function getstatus)"
397 echo `date +%F\ %T`" ERROR could not query number of processes from db (program: $program, function getstatus)"
398 continue
399 fi
400}
401
402# function to set status of a process in the db
403function setstatus()
404{
405 # remark:
406 # this function does not include the 'Default' flag
407 # for resetting steps
408
409 # for dowebplots (there are steps which have no entry in the DB)
410 if [ "$step" = "no" ]
411 then
412 return
413 fi
414
415 printprocesslog "DEBUG setstatus for step "$step
416
417 # reset status values
418 starttime=NULL
419 stoptime=NULL
420 availtime=NULL
421 returncode=NULL
422 # evaluate the status values
423 case $@ in
424 start) printprocesslog "DEBUG setstatus start"
425 starttime="Now()"
426 ;;
427 startj) printprocesslog "DEBUG setstatus startj"
428 starttime="'1971-01-01 01:01:01'" # special recognizable datetime, i.e. "reserved by JobManager for processing"
429 ;;
430 stop) case $check in
431 ok) printprocesslog "DEBUB setstatus stop - ok"
432 starttime=noreset
433 stoptime="Now()"
434 if [ "$processingsite" = "$storagesite" ]
435 then
436 availtime="Now()"
437 fi
438 ;;
439 no) printprocesslog "DEBUG setstatus stop - nothing new"
440 check="ok"
441 ;;
442 *) printprocesslog "DEBUG setstatus stop - failed"
443 starttime=noreset
444 stoptime="Now()"
445 if [ "$processingsite" = "$storagesite" ]
446 then
447 availtime="Now()"
448 fi
449 if [ "$check" == "" ]
450 then
451 returncode=1
452 else
453 returncode=$check
454 fi
455 check="ok"
456 ;;
457 esac
458 ;;
459 *) printprocesslog "ERROR function setstatus got wrong variable"
460 finish
461 ;;
462 esac
463
464 # get
465 getstepinfo
466
467 # get the influences from the steps.rc by evaluating the needs of all steps
468 othersteps=`grep $step $steps | grep -v '#' | grep "Needs" | grep -v "$step[.]Needs" | cut -d'.' -f1`
469
470 # get query
471 query=" UPDATE "
472 getalljoins
473 # set the status values according to the new status of the step
474 query=$query" SET "
475 if ! [ "$starttime" = "noreset" ]
476 then
477 query=$query" "$step"Status.fStartTime=$starttime, "
478 fi
479 query=$query" "$step"Status.fStopTime=$stoptime, "$step"Status.fAvailable=$availtime"
480 query=$query", "$step"Status.fReturnCode=$returncode , "$step"Status.fProcessingSiteKEY=$sitekey "
481 # set also the status values of the influenced steps
482 for otherstep in $othersteps
483 do
484 query=$query", "$otherstep"Status.fStartTime=NULL "
485 query=$query", "$otherstep"Status.fStopTime=NULL "
486 query=$query", "$otherstep"Status.fAvailable=NULL "
487 query=$query", "$otherstep"Status.fReturnCode=NULL "
488 query=$query", "$otherstep"Status.fProcessingSiteKEY=NULL "
489 done
490 # give the condition for which step the status values have to be set
491 query=$query" WHERE "
492 if [ "$s" = "" ]
493 then
494 s=0
495 fi
496 query=$query" "$step"Status."`echo ${prims[0]} | sed -e 's/,//g'`"='${primaries[$s*${#prims[@]}]}'"
497 for (( j=1 ; j < ${#prims[@]} ; j++ ))
498 do
499 query=$query" AND "$step"Status."`echo ${prims[$j]} | sed -e 's/,//g'`"='${primaries[$s*${#prims[@]}+$j]}' "
500 done
501 # add additional query to allow for locking in db
502 if [ "$1" = "start" ]
503 then
504 # process job only if it is not yet being processed
505 # i.e. either StartTime NULL or '1971-01-01 01:01:01' (reserved by JobManager for processing)
506 query=$query" AND (ISNULL("$step"Status.fStartTime) OR "$step"Status.fStartTime='1971-01-01 01:01:01')"
507 fi
508 # add row count to know how many rows have been changed
509 query=$query"; SELECT ROW_COUNT();"
510 # print query
511 #printprocesslog "DEBUG setstatus for step $step QUERY: "$query
512 #echo "DEBUG setstatus for step $step QUERY: "$query
513 # execute query
514 numchanged=`sendquery`
515 # should not be needed anymore once finish does proper exit
516 printprocesslog "DEBUG numchanged "$numchanged
517 if [ "$numchanged" = "" ]
518 then
519 printprocesslog "DEBUG numchanged empty."
520 finish
521 fi
522 if [ $numchanged -gt 0 ]
523 then
524 printprocesslog "INFO successful set of status in DB."
525 #echo "INFO successful set of status in DB."
526 else
527 # action may be taken in script using $numchanged
528 printprocesslog "DEBUG status in DB was already set by another process "
529 #echo "ERROR status in DB was already set by another process "
530 fi
531}
532
533function getdates()
534{
535 case $1 in
536 # all dates
537 all)
538 printprocesslog "DEBUG getdates case 'all'"
539 dates=( `find $auxdata -mindepth 3 -type d | sort -r | sed "s/\${auxdata_for_sed}//g" | sed -e 's/^\///'` )
540 ;;
541 # certain date
542 [0-9][0-9][0-9][0-9]/[0-9][0-9]/[0-9][0-9]|[0-9][0-9][0-9][0-9]/[0-9][0-9]/[0-9][0-9]-[0-9][0-9][0-9])
543 d=`echo $1 | grep -o '[0-9][0-9][0-9][0-9]/[0-9][0-9]/[0-9][0-9]'`
544 range=`echo $1 | grep -o '[0-9][0-9][0-9]$'`
545 range=`echo $range | sed -e 's/^0//' -e 's/^0//'`
546 printprocesslog "DEBUG getdates - certain date "$d"."
547 dates=( $d )
548 if [ "$range" != "" ]
549 then
550 printprocesslog "DEBUG getdates - add the last "$range" days."
551 yy=`echo $d | cut -c 1-4`
552 mm=`echo $d | cut -c 6-7`
553 dd=`echo $d | cut -c 9-10`
554 for (( numdates=1 ; numdates <= $range ; numdates++ ))
555 do
556 numhours=`echo " 12 + ( $numdates - 1 ) * 24 " | bc -l`
557 dates=( ${dates[@]} `date +%Y/%m/%d --date=$yy/$mm/$dd"-"$numhours"hour"` )
558 done
559 fi
560 ;;
561 # certain number of dates (between 0 and 9999)
562 [1-9][0-9][0-9][0-9]|[1-9][0-9][0-9]|[1-9][0-9]|[1-9])
563 # get last n nights
564 printprocesslog "DEBUG getdates - get the last "$1" days."
565 for (( numdates=1 ; numdates <= $1 ; numdates++ ))
566 do
567 numhours=`echo " 12 + ( $numdates - 1 ) * 24 " | bc -l`
568 dates=( ${dates[@]} `date +%Y/%m/%d --date="-"$numhours"hour"` )
569 done
570 # hour-dependent number of dates
571 if [ "$2" != "" ] && [ "$3" != "" ]
572 then
573 # get current hour
574 hour=`date +%k`
575 if [ $hour -le $2 ] || [ $hour -ge $3 ]
576 then
577 printprocesslog "DEBUG getdates - get the current night."
578 dates=( `date +%Y/%m/%d --date="-19hour"` )
579 fi
580 fi
581 ;;
582 # certain number of dates in the future (between 0 and 9)
583 +[1-9])
584 # get next n nights
585 printprocesslog "DEBUG getdates - get the next "$1" days (incl today)."
586 for (( numdates=1 ; numdates <= $1 ; numdates++ ))
587 do
588 numhours=`echo " 0 + ( $numdates - 1 ) * 24 " | bc -l`
589 dates=( ${dates[@]} `date +%Y/%m/%d --date="+"$numhours"hour"` )
590 done
591 # hour-dependent number of dates
592 if [ "$2" != "" ] && [ "$3" != "" ]
593 then
594 # get current hour
595 hour=`date +%k`
596 if [ $hour -le $2 ] || [ $hour -ge $3 ]
597 then
598 printprocesslog "DEBUG getdates - get the current night."
599 dates=( `date +%Y/%m/%d --date="-12hour"` )
600 fi
601 fi
602 ;;
603 *) # nothing valid given
604 echo "Please give valid option (YYYY/MM/DD[-RRR] or 1-9999 or +0-9)"
605 finish
606 ;;
607 esac
608}
609
610# missing: implement usage of this function in Fill*.sh
611function check_file_avail()
612{
613 if [ "$1" = "" ]
614 then
615 echo "Please give file name as first argument."
616 finish
617 fi
618
619 printprocesslog "INFO checking availability of "$1
620 if ! [ -e $1 ]
621 then
622 filenight=`basename $1 | cut -c 1-8`
623 # treat raw files differently than auxfiles
624 checkraw=`echo $1 | grep -E -o raw`
625 if [ "$checkraw" = "raw" ]
626 then
627 if [ $filenight -le $checknight ]
628 then
629 printprocesslog "WARN "$1" not found."
630 else
631 printprocesslog "INFO "$1" not found."
632 fi
633 return 1
634 fi
635 # only for aux files check of DB is needed
636 # treat ratescan files
637 checkratescan=`echo $1 | grep -E -o RATE_SCAN_DATA`
638 if [ "$checkratescan" = "RATE_SCAN_DATA" ] && [ $filenight -gt 20130408 ]
639 then
640 #query="SELECT fMeasurementTypeKey from MeasurementType WHERE fMeasurementTypeName like 'Ratescan%'"
641 #ratescantypes=`sendquery`
642 query="SELECT COUNT(*) FROM Schedule WHERE fStart BETWEEN "$scheduletart" AND "$schedulestop" AND fMeasurementTypeKey IN (5,8) "
643 numratescans=`sendquery`
644 if [ $numratescans -gt 0 ]
645 then
646 printprocesslog "ERROR "$1" not found."
647 else
648 printprocesslog "INFO "$1" not found."
649 fi
650 return 1
651 fi
652 query="SELECT COUNT(*) FROM RunInfo WHERE fNight="$filenight" AND fRunTypeKey=1"
653 numdatruns=`sendquery`
654 # for some files it is more severe when they are missing
655 checkfile=`echo $1 | grep -E -o 'DRIVE'\|'RATES'`
656 # print INFO/WARN/ERROR depending on severity
657 if [ $numdatruns -eq 0 ]
658 then
659 # in case no data runs are available from this night, it's not a problem if files are missing
660 printprocesslog "INFO "$1" not found."
661 else
662 if [ "$checkfile" != "" ]
663 then
664 # drive and trigger-rates files are needed for analysis
665 #printprocesslog "ERROR "$1" not found."
666 if [ $filenight -le $checknight ]
667 then
668 printprocesslog "ERROR "$1" not found."
669 else
670 printprocesslog "WARN "$1" not found."
671 fi
672 else
673 # other aux-files would be good to have
674 #printprocesslog "WARN "$1" not found."
675 if [ $filenight -le $checknight ]
676 then
677 printprocesslog "WARN "$1" not found."
678 else
679 printprocesslog "INFO "$1" not found."
680 fi
681 fi
682 fi
683 return 1
684 fi
685
686 # file available
687 return 0
688}
689
Note: See TracBrowser for help on using the repository browser.