Ignore:
Timestamp:
08/22/06 15:08:12 (19 years ago)
Author:
Daniela Dorner
Message:
*** empty log message ***
File:
1 edited

Legend:

Unmodified
Added
Removed
  • TabularUnified trunk/MagicSoft/Mars/datacenter/scripts/sourcefile

    r7909 r7910  
    113113}
    114114
     115# function to do continue in a loop or exit the program depending on what is needed
     116function contex()
     117{
     118   echo ""
     119   if [ "$singleprocess" = "yes" ]
     120   then
     121      continue
     122   else
     123      exit
     124   fi
     125}
     126
    115127# function to make sure that a directory is made
    116128function makedir()
     
    133145   checklock0=$?
    134146   case $checklock0 in
    135        0)   echo "checklock0=$checklock0 -> continue " ;;
    136        1)   echo "checklock0=$checklock0 -> file $lockfile exists "
    137             echo "-> $@ $program is running -> exit"
     147       0)   echo " checklock0=$checklock0 -> continue " ;;
     148       1)   echo " checklock0=$checklock0 -> file $lockfile exists -> exit"
    138149            date
    139             exit;;
    140        *)   echo "checklock0=$checklock0 -> something went completely wrong" ;;
     150            contex;;
     151       *)   echo " checklock0=$checklock0 -> something went completely wrong" ;;
    141152   esac
    142153}
     
    158169
    159170   case $check0 in
    160       1)   echo "check0=$check0 -> everything ok, got todo list -> run $program";;
    161       *)   echo "check0=$check0 -> ERROR -> could not get todo list -> exit"
     171      1)   echo " check0=$check0 -> everything ok, got todo list -> run $program";;
     172      *)   echo " check0=$check0 -> ERROR -> could not get todo list -> exit"
    162173           finish ;;
    163174   esac
     
    194205   resetstatusvalues
    195206   case $@ in
    196       start)   echo "start"
     207      start)   echo "setstatus start"
    197208               starttime="Now()"
    198209               ;;
    199        stop)   echo "stop"
     210       stop)   echo "setstatus stop"
    200211               case $check in
    201212                 ok)  echo " ok"
     
    230241   checkstatus=`root -q -b $macrospath/setstatus.C+\("\"$var2\""\,"\"$table\""\,"\"$column\""\,"\"$statustime\""\,"\"$returncode\""\,"\"$failedcode\""\,"\"$failedcodeadd\""\,"\"$starttime\""\,"\"$failedtime\""\) | tee $setstatuslog | grep int | sed -e 's/(int)//'`
    231242   case $checkstatus in
    232       1)   echo "checkstatus=$checkstatus -> everything ok, status has been set";;
    233       *)   echo "checkstatus=$checkstatus -> ERROR -> step could not be set -> exit"
     243      1)   echo " checkstatus=$checkstatus -> everything ok, status has been set";;
     244      *)   echo " checkstatus=$checkstatus -> ERROR -> step could not be set -> exit"
    234245           finish ;;
    235246   esac
     
    262273#   echo " influences: $influences"
    263274#   echo " primary: $primary"
    264 }
    265 
    266 function contex()
    267 {
    268    echo ""
    269    if [ "$singleprocess" = "yes" ]
    270    then
    271       continue
    272    else
    273       exit
    274    fi
    275275}
    276276
Note: See TracChangeset for help on using the changeset viewer.