File: zfs-needshutdown.sh.in

package info (click to toggle)
zfs-linux 2.3.2-2
  • links: PTS, VCS
  • area: contrib
  • in suites: trixie
  • size: 71,496 kB
  • sloc: ansic: 392,648; sh: 67,208; asm: 47,693; python: 8,160; makefile: 5,100; perl: 839; sed: 41
file content (10 lines) | stat: -rwxr-xr-x 260 bytes parent folder | download | duplicates (6)
1
2
3
4
5
6
7
8
9
10
#!/bin/sh

command -v getarg >/dev/null 2>&1 || . /lib/dracut-lib.sh

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."
    need_shutdown
fi