mirror of
https://git.proxmox.com/git/mirror_zfs.git
synced 2024-12-26 11:19:32 +03:00
7e8a2d0b75
Reviewed-by: Brian Behlendorf <behlendorf1@llnl.gov> Signed-off-by: Manuel Amador (Rudd-O) <rudd-o@rudd-o.com> Closes #5228 Closes #5238
31 lines
498 B
Bash
Executable File
31 lines
498 B
Bash
Executable File
#!/bin/sh
|
|
|
|
. /lib/dracut-zfs-lib.sh
|
|
|
|
_do_zpool_export() {
|
|
local ret=0
|
|
local errs=""
|
|
local final="${1}"
|
|
|
|
info "ZFS: Exporting ZFS storage pools..."
|
|
errs=$(export_all -F 2>&1)
|
|
ret=$?
|
|
[ -z "${errs}" ] || echo "${errs}" | vwarn
|
|
if [ "x${ret}" != "x0" ]; then
|
|
info "ZFS: There was a problem exporting pools."
|
|
fi
|
|
|
|
if [ "x${final}" != "x" ]; then
|
|
info "ZFS: pool list"
|
|
zpool list 2>&1 | vinfo
|
|
fi
|
|
|
|
return ${ret}
|
|
}
|
|
|
|
if command -v zpool >/dev/null; then
|
|
_do_zpool_export "${1}"
|
|
else
|
|
:
|
|
fi
|