From 88dedb66621f9073c83f981a4d9291817af4a7f4 Mon Sep 17 00:00:00 2001 From: David Teigland Date: Tue, 27 Aug 2024 15:51:44 -0500 Subject: [PATCH] fix(lvm): clean up whitespace in messages The lvm module has been printing messages with whitespace damage: Scanning devices sda sdb for LVM logical volumes vg/root vg/swap Remove the trailing space after the final device name, and remove the newlines between LV names. The message above becomes: Scanning devices sda sdb for LVM logical volumes vg/root vg/swap --- modules.d/90lvm/lvm_scan.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/modules.d/90lvm/lvm_scan.sh b/modules.d/90lvm/lvm_scan.sh index 980e449071..27834b7354 100755 --- a/modules.d/90lvm/lvm_scan.sh +++ b/modules.d/90lvm/lvm_scan.sh @@ -134,7 +134,7 @@ check_lvm_ver 2 3 14 "$maj" "$min" "$sub" \ && scan_args="$scan_args --nohints" if [ -n "$LVS" ]; then - info "Scanning devices $lvmdevs for LVM logical volumes $LVS" + info "Scanning devices ${lvmdevs% } for LVM logical volumes ${LVS//$'\n'/ }" # shellcheck disable=SC2086 LVSLIST=$(lvm lvs $scan_args --noheading -o lv_full_name,segtype $LVS) info "$LVSLIST"