aboutsummaryrefslogtreecommitdiffstats
path: root/contrib/dracut
diff options
context:
space:
mode:
authorнаб <[email protected]>2022-02-12 14:05:29 +0100
committerBrian Behlendorf <[email protected]>2022-03-03 10:45:19 -0800
commit93669c381249e0d42bb3eb21336861c1a759b6a6 (patch)
tree70c976f8d187ad867fb2c3763aa6a8ce42914c5f /contrib/dracut
parent497bf14a4a10666adc760513cb119db4402c30df (diff)
contrib/dracut: export-zfs: simplify
Reviewed-by: Brian Behlendorf <[email protected]> Signed-off-by: Ahelenia Ziemiańska <[email protected]> Closes #13093
Diffstat (limited to 'contrib/dracut')
-rwxr-xr-xcontrib/dracut/90zfs/export-zfs.sh.in14
1 files changed, 4 insertions, 10 deletions
diff --git a/contrib/dracut/90zfs/export-zfs.sh.in b/contrib/dracut/90zfs/export-zfs.sh.in
index 9ad72bd6f..6b711a0d1 100755
--- a/contrib/dracut/90zfs/export-zfs.sh.in
+++ b/contrib/dracut/90zfs/export-zfs.sh.in
@@ -3,28 +3,22 @@
. /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
+ echo "${errs}" | vwarn
+ if [ "${ret}" -ne 0 ]; then
info "ZFS: There was a problem exporting pools."
fi
- if [ "x${final}" != "x" ]; then
+ if [ -n "$1" ]; then
info "ZFS: pool list"
zpool list 2>&1 | vinfo
fi
- return "${ret}"
+ return "$ret"
}
if command -v zpool >/dev/null; then
_do_zpool_export "${1}"
-else
- :
fi