mirror of
https://git.proxmox.com/git/mirror_zfs.git
synced 2024-12-29 12:29:35 +03:00
eda3d4e1de
Provide '/lib/dracut-zfs-lib.sh' with utility functions. Signed-off-by: Sören Tempel <soeren+git@soeren-tempel.net> Signed-off-by: Brian Behlendorf <behlendorf1@llnl.gov> Issue #3109
30 lines
400 B
Bash
Executable File
30 lines
400 B
Bash
Executable File
#!/bin/sh
|
|
|
|
. /lib/dracut-zfs-lib.sh
|
|
|
|
_do_zpool_export() {
|
|
local ret=0
|
|
local final="${1}"
|
|
local opts=""
|
|
|
|
if [ "x${final}" != "x" ]; then
|
|
opts="-f"
|
|
fi
|
|
|
|
info "Exporting ZFS storage pools."
|
|
export_all ${opts} || ret=$?
|
|
|
|
if [ "x${final}" != "x" ]; then
|
|
info "zpool list"
|
|
zpool list 2>&1 | vinfo
|
|
fi
|
|
|
|
return ${ret}
|
|
}
|
|
|
|
if command -v zpool >/dev/null; then
|
|
_do_zpool_export "${1}"
|
|
else
|
|
:
|
|
fi
|