Subversion Repositories zfs_utils

Rev

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

Rev 40 Rev 41
Line 334... Line 334...
334
      # Derive the decrypted device name (.eli suffix on FreeBSD)
334
      # Derive the decrypted device name (.eli suffix on FreeBSD)
335
      my $decrypted = $disk . '.eli';
335
      my $decrypted = $disk . '.eli';
336
 
336
 
337
      # Decrypt using geli attach with the keyfile
337
      # Decrypt using geli attach with the keyfile
338
      logMsg("Decrypting $disk with keyfile $keyfile");
338
      logMsg("Decrypting $disk with keyfile $keyfile");
339
      runCmd("geli attach -k $geliConfig->{target} $disk");
339
      runCmd("geli attach -p -k $geliConfig->{target} $disk");
340
      if ( $lastRunError)
340
      if ( $lastRunError) {
341
         logMsg "Failed to decrypt $disk (exit $lastRunError)\n";
341
         logMsg "Failed to decrypt $disk (exit $lastRunError)\n";
342
         next; # ignore failed disks and continue to see if we can import the pool
342
         next; # ignore failed disks and continue to see if we can import the pool
343
      }
343
      }
344
 
344
 
345
      unless ( -e $decrypted ) {
345
      unless ( -e $decrypted ) {