aboutsummaryrefslogtreecommitdiffstats
path: root/contrib/dracut/90zfs/zfs-needshutdown.sh.in
blob: dd6de30c2704c127f4d2c01b389ad3d42dd3eeb9 (plain)
1
2
3
4
5
6
7
8
9
10
#!/bin/sh

command -v 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