Fix SC2181 ("[ $?") outside tests/

Reviewed-by: John Kennedy <john.kennedy@delphix.com>
Reviewed-by: Brian Behlendorf <behlendorf1@llnl.gov>
Signed-off-by: Ahelenia Ziemiańska <nabijaczleweli@nabijaczleweli.xyz>
Closes #12042
This commit is contained in:
наб
2021-05-14 11:55:17 +02:00
committed by Brian Behlendorf
parent d53a6969c1
commit 59d91b4d10
11 changed files with 29 additions and 52 deletions
+2 -4
View File
@@ -38,11 +38,9 @@ modprobe zfs 2>/dev/null
udevadm settle
if [ "${root}" = "zfs:AUTO" ] ; then
ZFS_DATASET="$(find_bootfs)"
if [ $? -ne 0 ] ; then
if ! ZFS_DATASET="$(find_bootfs)" ; then
zpool import -N -a ${ZPOOL_IMPORT_OPTS}
ZFS_DATASET="$(find_bootfs)"
if [ $? -ne 0 ] ; then
if ! ZFS_DATASET="$(find_bootfs)" ; then
warn "ZFS: No bootfs attribute found in importable pools."
export_all -F