Ignore:
Timestamp:
Sep 12, 2013 12:32:57 PM (7 months ago)
Author:
Kris Moore <kris@…>
Branches:
master, 9.2-release, releng/10.0, releng/10.0.1
Children:
0970223, 1d6186b
Parents:
ddd6a120
Message:

Add a better check to ensure the disk we are trying to add isn't
already in a zpool

File:
1 edited

Legend:

Unmodified
Added
Removed
  • src-sh/lpreserver/backend/functions.sh

    rc0e6494 r6b017ea  
    411411      exit_err "No such device: $disk" 
    412412      exit 0 
     413   fi 
     414 
     415   zpool list -H -v | awk '{print $1}' | grep -q "^$disk" 
     416   if [ $? -eq 0 ] ; then 
     417      exit_err "Error: This disk is already apart of a zpool!" 
    413418   fi 
    414419 
Note: See TracChangeset for help on using the changeset viewer.