HomeFreeBSD

Fix zed io-spare.sh dash incompatibility

Description

Fix zed io-spare.sh dash incompatibility

The zed's io-spare.sh script defines a vdev_status() function to query
the 'zpool status' output for obtaining the status of a specified vdev.
This function contains a small awk script that uses a parameter
expansion (${parameter/pattern/string}) supported in bash but not
in dash. Under dash, this fails with a "Bad substitution" error.

This commit replaces the awk script with a (hopefully more portable)
sed script that has been tested under both bash and dash.

Signed-off-by: Chris Dunlap <cdunlap@llnl.gov>
Signed-off-by: Brian Behlendorf <behlendorf1@llnl.gov>
Closes #2536

Details

Provenance
Chris Dunlap <cdunlap@llnl.gov>Authored on Sep 11 2014, 10:41 PM
Brian Behlendorf <behlendorf1@llnl.gov>Committed on Sep 23 2014, 10:32 PM
Parents
rG36283ca23346: Illumos 5138 - add tunable for maximum number of blocks freed in one txg
Branches
Unknown
Tags
Unknown