summaryrefslogtreecommitdiffstats
path: root/contrib
diff options
context:
space:
mode:
authorнаб <[email protected]>2022-04-05 01:09:11 +0200
committerBrian Behlendorf <[email protected]>2022-05-06 12:01:48 -0700
commit094709604419f2c0f347dae4ce28b1b50cd26463 (patch)
tree27f6ca0b30e9f9b3dda703805ad5458a21130a01 /contrib
parenta0e81a4074a5ad65b2a4ba4edbc87fd2219bd026 (diff)
contrib: dracut: zfs-needshutdown: don't list
Upstream-commit: 1cc9cc2f89eb67722109bbb5a2d9814b5e77d5db Reviewed-by: Brian Behlendorf <[email protected]> Signed-off-by: Ahelenia Ziemiańska <[email protected]> Closes #13291
Diffstat (limited to 'contrib')
-rwxr-xr-xcontrib/dracut/90zfs/zfs-needshutdown.sh.in2
1 files changed, 1 insertions, 1 deletions
diff --git a/contrib/dracut/90zfs/zfs-needshutdown.sh.in b/contrib/dracut/90zfs/zfs-needshutdown.sh.in
index dd6de30c2..7fb825bc9 100755
--- a/contrib/dracut/90zfs/zfs-needshutdown.sh.in
+++ b/contrib/dracut/90zfs/zfs-needshutdown.sh.in
@@ -2,7 +2,7 @@
command -v getarg >/dev/null 2>&1 || . /lib/dracut-lib.sh
-if zpool list 2>&1 | grep -q 'no pools available' ; then
+if [ -z "$(zpool get -Ho value name)" ]; then
info "ZFS: No active pools, no need to export anything."
else
info "ZFS: There is an active pool, will export it."