Skip to content

Commit

Permalink
Oops, the printf made this fail in a real AMI
Browse files Browse the repository at this point in the history
  • Loading branch information
ziggythehamster committed Feb 8, 2024
1 parent ea1d9f3 commit b583408
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions ebsnvme-id
Original file line number Diff line number Diff line change
Expand Up @@ -26,10 +26,10 @@ ensure_ebs_volume() {
exit 1
fi

mn="$(read_nvme_attr "$device" mn || printf "<unknown>")"
mn="$(read_nvme_attr "$device" mn)"

if [[ $mn != "${EBS_MN}" ]]; then
echo "[ERROR] /dev/$device is not an EBS device, but is $mn" >&2
if [[ "$mn" != "${EBS_MN}" ]]; then
echo "[ERROR] /dev/$device is not an EBS device, but is ${mn:-<unknown>}" >&2
exit 1
fi
}
Expand Down

0 comments on commit b583408

Please # to comment.