Changeset 32356 for trunk/ippScripts/scripts/magic_destreak_revert.pl
- Timestamp:
- Sep 6, 2011, 2:02:54 PM (15 years ago)
- File:
-
- 1 edited
-
trunk/ippScripts/scripts/magic_destreak_revert.pl (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/ippScripts/scripts/magic_destreak_revert.pl
r32048 r32356 9 9 my $host = hostname(); 10 10 my $date = `date`; 11 print "\n\n";12 print "Starting script $0 on $host at $date\n\n";11 print STDERR "\n\n"; 12 print STDERR "Starting script $0 on $host at $date\n\n"; 13 13 14 14 use vars qw( $VERSION ); … … 413 413 if ($backup_is_not_destreaked) { 414 414 if ($original_is_not_destreaked) { 415 # this is unexpected result. throw an error so this can be checked manually 416 print STDERR "both files appear to not be destreaked\n"; 415 print STDERR "\nBoth files appear to not be destreaked.\n"; 417 416 print STDERR "original: $original\n"; 418 417 print STDERR "backup: $backup\n"; 419 418 my $o_basename = basename($o_path); 420 419 my $b_basename = basename($b_path); 420 # if original file does not have SR_ in basename and the backup does then the 421 # files are in their original state. Just delete back up file 422 # otherwise go to failed_revert for manual inspection. 421 423 if (!($o_basename =~ /SR_/) and ($b_basename =~ /SR_/)) { 422 print " basenames are as expected it is safe to revert\n"; 424 print STDERR " basenames are as expected it is safe to delete backup file\n"; 425 if (! $ipprc->file_delete($backup, $force)) { 426 print STDERR "failed to delete $backup\n"; 427 return 0; 428 } 429 return 1; 423 430 } else { 431 # this is an unexpected result. throw an error so this can be checked manually 432 print STDERR " basenames for files are as NOT as expected unsafe to revert\n"; 433 print STDERR " o_basename: $o_basename\n"; 434 print STDERR " b_basename: $b_basename\n"; 424 435 return 0; 425 436 }
Note:
See TracChangeset
for help on using the changeset viewer.
