/[fai]/trunk/share/subroutines
ViewVC logotype

Diff of /trunk/share/subroutines

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 1459 by lange, Wed Jan 15 16:15:47 2003 UTC revision 1464 by lange, Thu Jan 16 15:58:06 2003 UTC
# Line 73  ifclass() { Line 73  ifclass() {
73      return $ret      return $ret
74  }  }
75  # - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -  # - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
 create_resolv_conf() {  
   
     # can be an extern script  
     # create a resolv.conf using the DHCP or BOOTP information  
     if [ "$DNSSRVS" ]; then  
         [ "$DOMAIN" ] && echo "domain $DOMAIN" >/tmp/etc/resolv.conf  
         for dnshost in $DNSSRVS ; do  
             echo "nameserver $dnshost" >>/tmp/etc/resolv.conf  
         done  
     fi  
 }  
 # - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -  
76  rwmount() {  rwmount() {
77    
78      # remount partition read/write      # remount partition read/write
# Line 205  get_fai_cvs() { Line 193  get_fai_cvs() {
193  # - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -  # - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
194  define_fai_flags() {  define_fai_flags() {
195    
196      # FAI_FLAGS are now comma separated, define all flags      # FAI_FLAGS are comma separated, define all flags
197      FAI_FLAGS=`echo $FAI_FLAGS | sed -e 's/,/ /g'`      FAI_FLAGS=`echo $FAI_FLAGS | sed -e 's/,/ /g'`
198      for flag in $FAI_FLAGS; do      for flag in $FAI_FLAGS; do
199          # define this flag as 1          # define this flag as 1
# Line 289  task_defclass() { Line 277  task_defclass() {
277    
278      # new script for defining classes; variables imported: $LOGDIR, $verbose, $debug      # new script for defining classes; variables imported: $LOGDIR, $verbose, $debug
279      fai-class $FAI/class $LOGDIR/FAI_CLASSES      fai-class $FAI/class $LOGDIR/FAI_CLASSES
   
280      classes=`cat $LOGDIR/FAI_CLASSES`      classes=`cat $LOGDIR/FAI_CLASSES`
281    
282      # also define all classes in reverse order ($revclasses)      # also define all classes in reverse order ($revclasses)
# Line 359  task_configure() { Line 346  task_configure() {
346  # - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -  # - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
347  do_script() {  do_script() {
348    
349      # execute scripts and save their outpu in log files      # execute scripts and save their output in log files
350      # cfengine, shell, perl and expect scripts are known types      # cfengine, shell, perl and expect scripts are known types
351      local shelldebug file filetype      local shelldebug file filetype
352    
# Line 381  do_script() { Line 368  do_script() {
368              echo "Executing   $shelldebug shell: $file"              echo "Executing   $shelldebug shell: $file"
369              echo "=====   shell: $file   =====" >> $LOGDIR/shell.log 2>&1              echo "=====   shell: $file   =====" >> $LOGDIR/shell.log 2>&1
370              $shelldebug ./$file >> $LOGDIR/shell.log 2>&1              $shelldebug ./$file >> $LOGDIR/shell.log 2>&1
371              check_status $file $?              check_status $file $? | tee -a $LOGDIR/shell.log
372          ;;          ;;
373    
374          *"cfengine script"*)          *"cfengine script"*)
375              echo "Executing cfengine: $file"              echo "Executing cfengine: $file"
376              echo "=====   cfengine: $file   =====" >> $LOGDIR/cfengine.log 2>&1              echo "=====   cfengine: $file   =====" >> $LOGDIR/cfengine.log 2>&1
377              ./$file --no-lock -v -f $file -D${cfclasses} >> $LOGDIR/cfengine.log 2>&1              ./$file --no-lock -v -f $file -D${cfclasses} >> $LOGDIR/cfengine.log 2>&1
378              check_status $file $?              check_status $file $? | tee -a $LOGDIR/cfengine.log
379          ;;          ;;
380    
381          *"perl script"*)          *"perl script"*)
382              echo "Executing    perl: $file"              echo "Executing    perl: $file"
383              echo "=====   perl: $file   =====" >> $LOGDIR/perl.log 2>&1              echo "=====   perl: $file   =====" >> $LOGDIR/perl.log 2>&1
384              ./$file >> $LOGDIR/perl.log 2>&1              ./$file >> $LOGDIR/perl.log 2>&1
385              check_status $file $?              check_status $file $? | tee -a $LOGDIR/perl.log
386          ;;          ;;
387    
388          *"expect script"*)          *"expect script"*)
389              echo "Executing  expect: $file"              echo "Executing  expect: $file"
390              echo "=====   expect: $file   =====" >> $LOGDIR/expect.log 2>&1              echo "=====   expect: $file   =====" >> $LOGDIR/expect.log 2>&1
391              ./$file >> $LOGDIR/expect.log 2>&1              ./$file >> $LOGDIR/expect.log 2>&1
392              check_status $file $?              check_status $file $? | tee -a $LOGDIR/expect.log
393          ;;          ;;
394    
395          *) echo "File $file has unsupported type $filetype." ;;          *) echo "File $file has unsupported type $filetype." ;;

Legend:
Removed from v.1459  
changed lines
  Added in v.1464

  ViewVC Help
Powered by ViewVC 1.1.5