Skip to content

Commit

Permalink
Merge pull request #5809 from janekmi/testconfig-generation-fix
Browse files Browse the repository at this point in the history
common: fix ndctl & jq detection for testconfig generation
  • Loading branch information
janekmi committed Jul 20, 2023
2 parents 1d3aa68 + 3a81a3d commit fafc805
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion utils/create-testconfig.sh
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@ TM=1
# lookup all Device DAX devices in the system
DEVICE_DAX_PATH=
device_dax_path=
if [ `which ndctl` -a `which jq` ]; then
if which ndctl > /dev/null 2>&1 && which jq > /dev/null 2>&1; then
DEVICE_DAX_PATH="$(ndctl list -X | jq -r '.[].daxregion.devices[].chardev' | awk '$0="/dev/"$0' | paste -sd' ')"
device_dax_path="$(ndctl list -X | jq -r '.[].daxregion.devices[].chardev' | awk '$0="'\''/dev/"$0"'\''"' | paste -sd',')"
fi
Expand Down

0 comments on commit fafc805

Please sign in to comment.