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

31 lines
480 B
Bash
Raw Normal View History

#!/bin/sh
2015-02-15 20:28:42 +01:00
. /lib/dracut-zfs-lib.sh
_do_zpool_export() {
2018-02-21 20:54:54 -05:00
ret=0
errs=""
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
2015-02-15 20:28:42 +01:00
if [ "x${final}" != "x" ]; then
info "ZFS: pool list"
zpool list 2>&1 | vinfo
fi
2015-02-15 20:28:42 +01:00
return ${ret}
}
if command -v zpool >/dev/null; then
2015-02-15 20:28:42 +01:00
_do_zpool_export "${1}"
else
:
fi