mirror of
https://git.proxmox.com/git/mirror_zfs.git
synced 2026-05-22 02:27:36 +03:00
shellcheck pass
note: which is non-standard. Use builtin 'command -v' instead. [SC2230] note: Use -n instead of ! -z. [SC2236] Reviewed-by: George Melikov <mail@gmelikov.ru> Reviewed-by: Giuseppe Di Natale <guss80@gmail.com> Reviewed-by: Brian Behlendorf <behlendorf1@llnl.gov> Signed-off-by: bunder2015 <omfgbunder@gmail.com> Closes #8367
This commit is contained in:
committed by
Brian Behlendorf
parent
cca14128c9
commit
bf6ca0a631
@@ -69,7 +69,7 @@ if [ "$1" = "-h" ] ; then
|
||||
exit
|
||||
fi
|
||||
|
||||
smartctl_path=$(which smartctl)
|
||||
smartctl_path=$(command -v smartctl)
|
||||
|
||||
if [ -b "$VDEV_UPATH" ] && [ -x "$smartctl_path" ] || [ -n "$samples" ] ; then
|
||||
if [ -n "$samples" ] ; then
|
||||
@@ -228,7 +228,7 @@ smart_test)
|
||||
esac
|
||||
|
||||
with_vals=$(echo "$out" | grep -E "$scripts")
|
||||
if [ ! -z "$with_vals" ]; then
|
||||
if [ -n "$with_vals" ]; then
|
||||
echo "$with_vals"
|
||||
without_vals=$(echo "$scripts" | tr "|" "\n" |
|
||||
grep -v -E "$(echo "$with_vals" |
|
||||
@@ -237,6 +237,6 @@ else
|
||||
without_vals=$(echo "$scripts" | tr "|" "\n" | awk '{print $0"="}')
|
||||
fi
|
||||
|
||||
if [ ! -z "$without_vals" ]; then
|
||||
if [ -n "$without_vals" ]; then
|
||||
echo "$without_vals"
|
||||
fi
|
||||
|
||||
Reference in New Issue
Block a user