mirror of
https://git.proxmox.com/git/mirror_zfs.git
synced 2025-02-07 07:43:21 +03:00
![Brian Behlendorf](/assets/img/avatar_default.png)
Commit d2bce6d03
added the 'make checkbashisms' target but did not
resolve all of the bashisms in the scripts. This commit doesn't
resolve them all either but it does fix up a few, and it excludes
the others so 'make checkstyle' no longer prints warnings. It's
a small step in the right direction.
* Dracut is Linux specific and itself depends on bash. Therefore
all dracut support scripts can be bash specific, update their
shebang accordingly.
* zed-functions.sh, zfs-import, zfs-mount, zfs-zed, smart
paxcheck.sh, make_gitrev.sh - these scripts were excuded from
the check until they can be updated and properly tested.
* zfsunlock - only whole values for sleep are allowed.
* vdev_id - removed unneeded locals; use && instead of -a.
* dkms.mkconf, dkms.postbuil - use || instead of -o.
Reviewed-by: InsanePrawn <insane.prawny@gmail.com>
Reviewed-by: Gabriel A. Devenyi <gdevenyi@gmail.com>
Reviewed-by: Ryan Moeller <ryan@iXsystems.com>
Reviewed-by: George Melikov <mail@gmelikov.ru>
Signed-off-by: Brian Behlendorf <behlendorf1@llnl.gov>
Closes #10755
31 lines
482 B
Bash
Executable File
31 lines
482 B
Bash
Executable File
#!/bin/bash
|
|
|
|
. /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
|