diff --git a/driveAtlas.sh b/driveAtlas.sh index ff6f7e6..60c564d 100644 --- a/driveAtlas.sh +++ b/driveAtlas.sh @@ -293,12 +293,23 @@ check_dependencies() { check_dependencies #------------------------------------------------------------------------------ -# Chassis Type Definitions +# Chassis Layout Generator Functions # These define the physical layout and display formatting for each chassis type #------------------------------------------------------------------------------ +#------------------------------------------------------------------------------ +# generate_10bay_layout +# +# Generates ASCII art representation of a 10-bay hot-swap chassis (Sliger CX4712). +# Shows storage controllers, M.2 NVMe slot, and 10 front hot-swap bays. +# +# Args: +# $1 - Hostname to display in the layout header +# +# Side effects: Calls build_drive_map() to populate DRIVE_MAP +#------------------------------------------------------------------------------ generate_10bay_layout() { - local hostname=$1 + local hostname="$1" build_drive_map # Fixed width for consistent box drawing (fits device names like "nvme0n1") @@ -349,8 +360,19 @@ generate_10bay_layout() { printf "└────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────┘\n" } +#------------------------------------------------------------------------------ +# generate_micro_layout +# +# Generates ASCII art representation of a micro SBC (e.g., ZimaBoard). +# Shows storage controllers, onboard eMMC (if present), and 2 SATA ports. +# +# Args: +# $1 - Hostname to display in the layout header +# +# Side effects: Calls build_drive_map() to populate DRIVE_MAP +#------------------------------------------------------------------------------ generate_micro_layout() { - local hostname=$1 + local hostname="$1" build_drive_map # Check for eMMC storage @@ -384,8 +406,19 @@ generate_micro_layout() { printf "└─────────────────────────────────────────────────────────────┘\n" } +#------------------------------------------------------------------------------ +# generate_large1_layout +# +# Generates ASCII art representation of a large1 chassis (Rosewill RSV-L4500U). +# Shows storage controllers, 2 M.2 NVMe slots, and 15 front bays in 3x5 grid. +# +# Args: +# $1 - Hostname to display in the layout header +# +# Side effects: Calls build_drive_map() to populate DRIVE_MAP +#------------------------------------------------------------------------------ generate_large1_layout() { - local hostname=$1 + local hostname="$1" build_drive_map # large1 has 3 stacks of 5 bays at front (15 total) + 2 M.2 slots