mirror of
https://git.proxmox.com/git/mirror_zfs.git
synced 2024-12-30 21:09:38 +03:00
34eef3e9a7
- Remove `SHELLCHECK_IGNORE` in favor of inline suppressions and more general `SHELLCHECK_OPTS`. - Exclude `SC2250` (turned on by `--enable=all`) globally - Pass `--enable=all` to shellcheck for scripts in contrib/: it's very important to catch errors early in areas that are not easily testable. Reviewed-by: George Melikov <mail@gmelikov.ru> Reviewed-by: Brian Behlendorf <behlendorf1@llnl.gov> Signed-off-by: szubersk <szuberskidamian@gmail.com> Closes #12760
31 lines
482 B
Bash
Executable File
31 lines
482 B
Bash
Executable File
#!/bin/sh
|
|
|
|
. /lib/dracut-zfs-lib.sh
|
|
|
|
_do_zpool_export() {
|
|
ret=0
|
|
errs=""
|
|
final="${1}"
|
|
|
|
info "ZFS: Exporting ZFS storage pools..."
|
|
errs=$(export_all -F 2>&1)
|
|
ret=$?
|
|
[ -z "${errs}" ] || echo "${errs}" | vwarn
|
|
if [ "x${ret}" != "x0" ]; then
|
|
info "ZFS: There was a problem exporting pools."
|
|
fi
|
|
|
|
if [ "x${final}" != "x" ]; then
|
|
info "ZFS: pool list"
|
|
zpool list 2>&1 | vinfo
|
|
fi
|
|
|
|
return "${ret}"
|
|
}
|
|
|
|
if command -v zpool >/dev/null; then
|
|
_do_zpool_export "${1}"
|
|
else
|
|
:
|
|
fi
|