diff options
author | Lukas Wunner <[email protected]> | 2015-02-04 10:45:19 +0100 |
---|---|---|
committer | Brian Behlendorf <[email protected]> | 2015-02-09 10:08:05 -0800 |
commit | 293d141ae4f6b2345249020b656cfc0ce007b9fa (patch) | |
tree | 0f13c47a62f2f09ffb69b186facec3beaf324566 /dracut | |
parent | 33b4de513ee81c2a87e1b954a9544a5eec1f8f94 (diff) |
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 <[email protected]>
Signed-off-by: Brian Behlendorf <[email protected]>
Closes #3083
Diffstat (limited to 'dracut')
-rwxr-xr-x | dracut/90zfs/export-zfs.sh.in | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/dracut/90zfs/export-zfs.sh.in b/dracut/90zfs/export-zfs.sh.in index dd1ea8121..12300fc97 100755 --- a/dracut/90zfs/export-zfs.sh.in +++ b/dracut/90zfs/export-zfs.sh.in @@ -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 |