aboutsummaryrefslogtreecommitdiffstats
path: root/cmd/zed/zed.d
diff options
context:
space:
mode:
authorbunder2015 <[email protected]>2019-02-04 12:07:19 -0500
committerBrian Behlendorf <[email protected]>2019-02-04 09:07:19 -0800
commitbf6ca0a6313ad09f4b98f774069693c1b36ecc60 (patch)
tree6adfa8a09605d67cb473d89ce4907b805702081e /cmd/zed/zed.d
parentcca14128c956e26486633d50650e11cda89b1d17 (diff)
shellcheck pass
note: which is non-standard. Use builtin 'command -v' instead. [SC2230] note: Use -n instead of ! -z. [SC2236] Reviewed-by: George Melikov <[email protected]> Reviewed-by: Giuseppe Di Natale <[email protected]> Reviewed-by: Brian Behlendorf <[email protected]> Signed-off-by: bunder2015 <[email protected]> Closes #8367
Diffstat (limited to 'cmd/zed/zed.d')
-rwxr-xr-xcmd/zed/zed.d/statechange-led.sh2
-rw-r--r--cmd/zed/zed.d/zed-functions.sh2
2 files changed, 2 insertions, 2 deletions
diff --git a/cmd/zed/zed.d/statechange-led.sh b/cmd/zed/zed.d/statechange-led.sh
index c1a1bd92d..6484b7959 100755
--- a/cmd/zed/zed.d/statechange-led.sh
+++ b/cmd/zed/zed.d/statechange-led.sh
@@ -165,7 +165,7 @@ process_pool()
fi
}
-if [ ! -z "$ZEVENT_VDEV_ENC_SYSFS_PATH" ] && [ ! -z "$ZEVENT_VDEV_STATE_STR" ] ; then
+if [ -n "$ZEVENT_VDEV_ENC_SYSFS_PATH" ] && [ -n "$ZEVENT_VDEV_STATE_STR" ] ; then
# Got a statechange for an individual VDEV
val=$(state_to_val "$ZEVENT_VDEV_STATE_STR")
vdev=$(basename "$ZEVENT_VDEV_PATH")
diff --git a/cmd/zed/zed.d/zed-functions.sh b/cmd/zed/zed.d/zed-functions.sh
index fb16e9d36..a6e608573 100644
--- a/cmd/zed/zed.d/zed-functions.sh
+++ b/cmd/zed/zed.d/zed-functions.sh
@@ -434,7 +434,7 @@ zed_guid_to_pool()
fi
guid=$(printf "%llu" "$1")
- if [ ! -z "$guid" ] ; then
+ if [ -n "$guid" ] ; then
$ZPOOL get -H -ovalue,name guid | awk '$1=='"$guid"' {print $2}'
fi
}