zfs-builds-mm/zfs-2.0.0-rc6/contrib/dracut/90zfs/zfs-needshutdown.sh.in
2020-11-15 11:35:49 +01:00

10 lines
267 B
Bash
Executable file

#!/bin/bash
type getarg >/dev/null 2>&1 || . /lib/dracut-lib.sh
if zpool list 2>&1 | grep -q 'no pools available' ; then
info "ZFS: No active pools, no need to export anything."
else
info "ZFS: There is an active pool, will export it."
need_shutdown
fi