Skip to content

Commit

Permalink
fix(lvm): clean up whitespace in messages
Browse files Browse the repository at this point in the history
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
  • Loading branch information
teigland committed Aug 27, 2024
1 parent 5d2bda4 commit 88dedb6
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion modules.d/90lvm/lvm_scan.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down

0 comments on commit 88dedb6

Please sign in to comment.