File: zfs-needshutdown.sh.in

package info (click to toggle)
zfs-linux 2.1.11-1%2Bdeb12u1
  • links: PTS, VCS
  • area: contrib
  • in suites: bookworm
  • size: 77,344 kB
  • sloc: ansic: 376,447; sh: 59,625; python: 7,872; asm: 6,476; makefile: 5,812; perl: 770; sed: 41; awk: 5
file content (10 lines) | stat: -rwxr-xr-x 260 bytes parent folder | download | duplicates (4)
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