[csw-devel] SF.net SVN: opencsw:[659] mirror/check-zpool

dmichelsen at users.sourceforge.net dmichelsen at users.sourceforge.net
Thu Feb 28 09:41:02 CET 2013


Revision: 659
          http://opencsw.svn.sourceforge.net/opencsw/?rev=659&view=rev
Author:   dmichelsen
Date:     2013-02-28 08:41:01 +0000 (Thu, 28 Feb 2013)
Log Message:
-----------
check-zpool: Add edge-cases

Modified Paths:
--------------
    mirror/check-zpool

Modified: mirror/check-zpool
===================================================================
--- mirror/check-zpool	2013-02-20 15:17:27 UTC (rev 658)
+++ mirror/check-zpool	2013-02-28 08:41:01 UTC (rev 659)
@@ -232,12 +232,16 @@
     }
     push @{$exit{OK}}, "Pool '$poolname' was scrubbed $no_scrub_since ago";
   } else {
-    if( !$since ) {
+    if( $sa && !$since ) {
       push @{$exit{WARNING}}, "Scrub for the pool '$poolname' was never run"
         . ' but must not be older than ' . $fmt->format_duration( $sa, significant_units => 2 );
     }
   }
 
+  if( !$since && !$last ) {
+    push @{$exit{OK}}, "Pool '$poolname' was never scrubbed";
+  }
+
   # 3. warn if there were correctable errors in the pool
   my $repairs = $p->scrub_repairs;
   if( $repairs ) {

This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.



More information about the devel mailing list