- echo "-E- unable to export the local pool $i"
- zpool status $i | $mailx -s "zpool scrub on $hostname unable to export the local pool $i" "$mailto"
+ zpool export $i
+ if [ $? != 0 ]; then
+ echo "-E- unable to export the local pool $i"
+ zpool status $i | $mailx -s "zpool scrub on $hostname unable to export the local pool $i" "$mailto"
+ fi