Changeset 33197
- Timestamp:
- Feb 2, 2012, 9:43:52 AM (14 years ago)
- File:
-
- 1 edited
-
trunk/tools/repair_bad_instance (modified) (5 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/tools/repair_bad_instance
r33196 r33197 10 10 use PS::IPP::Metadata::Config; 11 11 use PS::IPP::Config 1.01 qw( :standard ); 12 use File::Basename; 12 13 13 14 my $dbname = 'gpc1'; … … 16 17 my ( $exp_id, 17 18 $class_id, 18 $pretend,19 19 $repair_lost, 20 20 $go, … … 28 28 'repair|r' => \$go, 29 29 'repair-lost|l' => \$repair_lost, 30 'pretend' => \$pretend,31 30 ) or pod2usage( 2 ); 32 31 … … 35 34 # -exitval => 3) 36 35 unless (defined $exp_id and defined $class_id ) { 37 print STDERR "Usage: $0 --exp_id <exp_id> --class_id <class_id> [--repair]\n"; 36 my $prog = basename($0); 37 print STDERR "Usage:\n\t$prog --exp_id <exp_id> --class_id <class_id> [--repair --repair-lost]\n"; 38 38 exit 1; 39 39 } 40 41 $pretend = "" if !$pretend;42 43 # print "supplied parameters: $exp_id $class_id $pretend\n";44 40 45 41 my $ipprc = PS::IPP::Config->new(); … … 97 93 } 98 94 } else { 99 print "No good instances of $uri found. To fix run:\n";100 95 my $cmd = "regtool -dbname $dbname -updateprocessedimfile -set_ignored -exp_id $exp_id -class_id $class_id\n"; 101 print "$cmd\n"; 96 print "No good instances of $uri found. "; 97 if ($repair_lost) { 98 print "Executing: "; 99 } else { 100 print "To fix run:\n"; 101 } 102 print "\t$cmd\n"; 102 103 if ($repair_lost) { 103 104 $fixed = 1;
Note:
See TracChangeset
for help on using the changeset viewer.
