Fix loop in Dracut shutdown script
The shell executes each command of a pipeline in a subshell, thus $ret always had the same value after the while loop that it had before the loop (http://mywiki.wooledge.org/BashFAQ/024), signaling success even if some of the zpools could not be exported. Signed-off-by: Lukas Wunner <lukas@wunner.de> Signed-off-by: Brian Behlendorf <behlendorf1@llnl.gov> Closes #3083
This commit is contained in:
parent
33b4de513e
commit
293d141ae4
|
@ -10,7 +10,7 @@ _do_zpool_export() {
|
|||
fi
|
||||
|
||||
info "Exporting ZFS storage pools"
|
||||
zpool list -H | while read fs rest ; do
|
||||
for fs in `zpool list -H -o name` ; do
|
||||
zpool export $force "$fs" || ret=$?
|
||||
done
|
||||
|
||||
|
|
Loading…
Reference in New Issue