From b583408ebe94a69c4015c27f74aee87f7cffd1b2 Mon Sep 17 00:00:00 2001 From: Keith Gable Date: Wed, 7 Feb 2024 16:26:10 -0800 Subject: [PATCH] Oops, the printf made this fail in a real AMI --- ebsnvme-id | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/ebsnvme-id b/ebsnvme-id index 72d6016..578231d 100644 --- a/ebsnvme-id +++ b/ebsnvme-id @@ -26,10 +26,10 @@ ensure_ebs_volume() { exit 1 fi - mn="$(read_nvme_attr "$device" mn || printf "")" + 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:-}" >&2 exit 1 fi }