Files
mirror_zfs/contrib/dracut/90zfs/export-zfs.sh.in
T

23 lines
384 B
Bash
Raw Normal View History

#!/bin/sh
_do_zpool_export() {
info "ZFS: Exporting ZFS storage pools..."
errs=$(zpool export -aF 2>&1)
ret=$?
2022-02-12 14:05:29 +01:00
echo "${errs}" | vwarn
if [ "${ret}" -ne 0 ]; then
info "ZFS: There was a problem exporting pools."
fi
2022-02-12 14:05:29 +01:00
if [ -n "$1" ]; then
info "ZFS: pool list"
zpool list 2>&1 | vinfo
fi
2022-02-12 14:05:29 +01:00
return "$ret"
}
if command -v zpool >/dev/null; then
2015-02-15 20:28:42 +01:00
_do_zpool_export "${1}"
fi