File: zfs-needshutdown.sh.in

package info (click to toggle)
zfs-linux 2.3.3-1
  • links: PTS, VCS
  • area: contrib
  • in suites: forky, sid
  • size: 70,488 kB
  • sloc: ansic: 393,047; sh: 67,422; asm: 47,734; python: 8,160; makefile: 5,105; perl: 859; sed: 41
file content (10 lines) | stat: -rwxr-xr-x 260 bytes parent folder | download | duplicates (7)
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