[Bio] / FigKernelScripts / boot_cluster_seed.pl Repository:
ViewVC logotype

Diff of /FigKernelScripts/boot_cluster_seed.pl

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

revision 1.4, Mon Dec 5 18:56:37 2005 UTC revision 1.5, Tue Jan 10 18:39:34 2006 UTC
# Line 64  Line 64 
64      die "Usage: $0 [--sge-only]\n";      die "Usage: $0 [--sge-only]\n";
65  }  }
66    
67  my $celldir = $FIG_Config::sge_cell_dir;  my $celldir;
68    if (not $FIG_Config::use_system_sge)
69    {
70        $celldir = $FIG_Config::sge_cell_dir;
71  if (!defined($celldir))  if (!defined($celldir))
72  {  {
73      die "SGE cell directory not specified in FIG_Config::sge_cell_dir\n";      die "SGE cell directory not specified in FIG_Config::sge_cell_dir\n";
# Line 73  Line 76 
76  {  {
77      die "SGE cell directory $celldir not found\n";      die "SGE cell directory $celldir not found\n";
78  }  }
79    }
80    
81  #  #
82  # Step 1.  # Step 1.
# Line 87  Line 91 
91          # See if the size is right          # See if the size is right
92          #          #
93    
94          my $sum = `cd $FIG_Config::db_datadir; ls -lR  | grep -v err | awk '{print \$5, \$8}'|md5sum | awk '{print \$1}'`;          my $sum = `cd $FIG_Config::db_datadir; ls -lR  | grep -v '*-bin.*' | grep -v err | awk '{print \$5, \$NF}'|md5sum | awk '{print \$1}'`;
95          chomp($sum);          chomp($sum);
96    
97          print "Computed size as '$sum' want $FIG_Config::db_datadir_size\n";          print "Computed size as '$sum' want $FIG_Config::db_datadir_size\n";
# Line 108  Line 112 
112          my $dir = dirname($FIG_Config::db_datadir);          my $dir = dirname($FIG_Config::db_datadir);
113          &FIG::verify_dir($dir);          &FIG::verify_dir($dir);
114    
115          print "Extract db snapshot from $FIG_Config::db_snapshot_file to $dir\n";          my $snap = $FIG_Config::db_snapshot_file;
116          &FIG::run("cd $dir; tar xzfp $FIG_Config::db_snapshot_file");  
117            if (! -f $snap)
118            {
119                die "No database snapshot found!\n";
120            }
121    
122            print "Extract db snapshot from $snap to $dir\n";
123    
124            my $tar_args = "xfp";
125    
126            if ($snap =~ /gz$/)
127            {
128                $tar_args .= "z";
129            }
130            &FIG::run("cd $dir; tar $tar_args $FIG_Config::db_snapshot_file");
131      }      }
132    
133      if (! -d $FIG_Config::db_datadir)      if (! -d $FIG_Config::db_datadir)
# Line 162  Line 180 
180  # Step 4/5.  # Step 4/5.
181  #  #
182    
183    if ($celldir)
184    {
185  my $sge_cmd = "source $FIG_Config::fig_disk/config/fig-user-env.sh; $celldir/common/sgeexecd start";  my $sge_cmd = "source $FIG_Config::fig_disk/config/fig-user-env.sh; $celldir/common/sgeexecd start";
186  warn "Starting sge: $sge_cmd\n";  warn "Starting sge: $sge_cmd\n";
187  my $rc = system($sge_cmd);  my $rc = system($sge_cmd);
# Line 176  Line 196 
196      }      }
197  }  }
198  $sge_running = 1;  $sge_running = 1;
199    }
200    
201  #  #
202  # Step 6.  # Step 6.

Legend:
Removed from v.1.4  
changed lines
  Added in v.1.5

MCS Webmaster
ViewVC Help
Powered by ViewVC 1.0.3