diff --git a/driveAtlas.sh b/driveAtlas.sh index 2c42e7e..8177baa 100644 --- a/driveAtlas.sh +++ b/driveAtlas.sh @@ -344,26 +344,29 @@ generate_10bay_layout() { # Fixed width for consistent box drawing (fits device names like "nvme0n1") local drive_width=10 + # Box interior width = 136 (determined by 10 bay boxes: 4 + 10*13 + 2) + # Total box width = 138 (136 interior + 2 for │ borders) + # Main chassis section - printf "┌────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────┐\n" - printf "│ %-126s │\n" "$hostname - Sliger CX4712 (10x 3.5\" Hot-swap)" - printf "│ │\n" + printf "┌────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────┐\n" + printf "│ %-132s │\n" "$hostname - Sliger CX4712 (10x 3.5\" Hot-swap)" + printf "│%-136s│\n" "" # Show storage controllers - printf "│ Storage Controllers: │\n" + printf "│ %-134s│\n" "Storage Controllers:" while IFS= read -r ctrl; do - [[ -n "$ctrl" ]] && printf "│ %-126s│\n" "$ctrl" + [[ -n "$ctrl" ]] && printf "│ %-134.134s│\n" "$ctrl" done < <(get_storage_controllers) - printf "│ │\n" + printf "│%-136s│\n" "" # M.2 NVMe slot if present if [[ -n "${DRIVE_MAP[m2-1]}" ]]; then - printf "│ M.2 NVMe: %-10s │\n" "${DRIVE_MAP[m2-1]}" - printf "│ │\n" + printf "│ %-134s│\n" " M.2 NVMe: ${DRIVE_MAP[m2-1]}" + printf "│%-136s│\n" "" fi - printf "│ Front Hot-swap Bays: │\n" - printf "│ │\n" + printf "│ %-134s│\n" " Front Hot-swap Bays:" + printf "│%-136s│\n" "" # Bay top borders printf "│ " @@ -386,7 +389,7 @@ generate_10bay_layout() { done printf " │\n" - printf "└────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────┘\n" + printf "└────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────┘\n" } #------------------------------------------------------------------------------