]>
Commit | Line | Data |
---|---|---|
16692e6b | 1 | #!/bin/sh |
07a3312f LW |
2 | |
3 | _do_zpool_export() { | |
7e8a2d0b | 4 | info "ZFS: Exporting ZFS storage pools..." |
6a41310c | 5 | errs=$(zpool export -aF 2>&1) |
7e8a2d0b | 6 | ret=$? |
93669c38 AZ |
7 | echo "${errs}" | vwarn |
8 | if [ "${ret}" -ne 0 ]; then | |
7e8a2d0b | 9 | info "ZFS: There was a problem exporting pools." |
07a3312f LW |
10 | fi |
11 | ||
93669c38 | 12 | if [ -n "$1" ]; then |
7e8a2d0b | 13 | info "ZFS: pool list" |
07a3312f LW |
14 | zpool list 2>&1 | vinfo |
15 | fi | |
16 | ||
93669c38 | 17 | return "$ret" |
07a3312f LW |
18 | } |
19 | ||
20 | if command -v zpool >/dev/null; then | |
eda3d4e1 | 21 | _do_zpool_export "${1}" |
07a3312f | 22 | fi |