File: zfs-needshutdown.sh.in

package info (click to toggle)
zfs-linux 2.0.3-9%2Bdeb11u1
  • links: PTS, VCS
  • area: contrib
  • in suites: bullseye
  • size: 54,364 kB
  • sloc: ansic: 365,663; sh: 57,417; asm: 8,996; python: 8,652; makefile: 5,521; perl: 770; sed: 41; awk: 5
file content (10 lines) | stat: -rwxr-xr-x 271 bytes parent folder | download
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