Subversion Repositories sysadmin_scripts

Rev

Rev 27 | Rev 29 | Go to most recent revision | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 27 Rev 28
Line 205... Line 205...
205
   my ( $remoteServer, $remoteStaging, $remoteTarget, $directory, $checksum ) = @_;
205
   my ( $remoteServer, $remoteStaging, $remoteTarget, $directory, $checksum ) = @_;
206
   my $md5sum = `ssh $remoteServer "find '$remoteStaging/$directory' -type f -exec md5sum \\{\\} \\; | cut -d' ' -f1 | sort | md5sum | cut -d' ' -f1"`;
206
   my $md5sum = `ssh $remoteServer "find '$remoteStaging/$directory' -type f -exec md5sum \\{\\} \\; | cut -d' ' -f1 | sort | md5sum | cut -d' ' -f1"`;
207
   chomp $md5sum;
207
   chomp $md5sum;
208
   if ( $checksum eq $md5sum ) {
208
   if ( $checksum eq $md5sum ) {
209
      if ( defined ( $config{ 'final procedure' } ) ) {
209
      if ( defined ( $config{ 'final procedure' } ) ) {
210
         my $result = &( $config{ 'final procedure' } ) ( $remoteServer, $remoteStaging, $remoteTarget, $directory );
210
         my $result = $config{ 'final procedure' }->( $remoteServer, $remoteStaging, $remoteTarget, $directory );
211
         &logit( $result ) if ( $result );
211
         &logit( $result ) if ( $result );
212
      } # do the final procedure, if it exist
212
      } # do the final procedure, if it exist
213
   } else {
213
   } else {
214
      &logit( "Invalid checksum moving directory $directory" );
214
      &logit( "Invalid checksum moving directory $directory" );
215
      return 0;
215
      return 0;