/[sysadmin-cookbook]/recepies/smart/smart-test-relocate.pl
This is repository of my old source code which isn't updated any more. Go to git.rot13.org for current projects!
ViewVC logotype

Diff of /recepies/smart/smart-test-relocate.pl

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

revision 304 by dpavlin, Sun Nov 24 21:03:59 2013 UTC revision 305 by dpavlin, Sun Nov 24 21:21:17 2013 UTC
# Line 61  sub smart_last_error { Line 61  sub smart_last_error {
61                  if (/^#\s+1.+Completed: read failure\s+\S+\s+\S+\s+(\d+)/) {                  if (/^#\s+1.+Completed: read failure\s+\S+\s+\S+\s+(\d+)/) {
62                          write_sector $1;                          write_sector $1;
63                          smart_test $1;                          smart_test $1;
64                          return;                          return 1;
65                  }                  }
66          }          }
67  }  }
68    
69  smart_last_error;  smart_last_error || smart_test 0;
70    
71  while ( smart ) {  while ( smart ) {
72          warn "sleep $delay s", ( $test_started ? " smart test running..." : "idle" ), "\n";          warn "sleep $delay s", ( $test_started ? " smart test running..." : "idle" ), "\n";

Legend:
Removed from v.304  
changed lines
  Added in v.305

  ViewVC Help
Powered by ViewVC 1.1.26