diff --git a/inxi b/inxi index 5010df1..3e94b35 100755 --- a/inxi +++ b/inxi @@ -3931,8 +3931,8 @@ print_gfx_data() print_hard_disk_data() { eval $LOGFS - local hdd_data='' hdd_data_2='' a_hdd_working='' hdd_temp_data='' - local dev_data='' size_data='' hdd_model='' usb_data='' + local hdd_data='' hdd_data_2='' a_hdd_working='' hdd_temp_data='' hdd_string='' + local dev_data='' size_data='' hdd_model='' usb_data='' hdd_name='' # load A_HDD_DATA get_hdd_data_basic @@ -3962,6 +3962,7 @@ print_hard_disk_data() fi dev_data="/dev/${a_hdd_working[0]} " size_data=" ${a_hdd_working[1]}" + hdd_name="${a_hdd_working[2]}" fi if [[ $B_EXTRA_DATA == 'true' && -n $dev_data ]];then @@ -3970,21 +3971,18 @@ print_hard_disk_data() if [[ -n $hdd_temp_data ]];then hdd_temp_data=" ${hdd_temp_data}C" else - hdd_temp_data="" + hdd_temp_data='' fi fi if [[ $B_SHOW_DISK == 'true' ]];then - hdd_model="${hdd_model}${C1}$(($i+1)):${C2} $usb_data$dev_data${a_hdd_working[2]}$size_data$hdd_temp_data " - if [[ -z $hdd_model ]];then - hdd_model='None Detected ' - fi + hdd_string="$usb_data$dev_data$hdd_name$size_data$hdd_temp_data" + hdd_model="${hdd_model}${C1}$(($i+1)):${C2} $hdd_string " # printing line one, then every other line, and after, if leftovers, print that line. case $i in 0) hdd_data=$( create_print_line "Disks:" "${C1}HDD${C2} ${C1}Total Size:${C2} ${hdd_capacity} (${hdd_used}) ${hdd_model}" ) print_screen_output "$hdd_data" - hdd_data='' hdd_model='' ;; *) @@ -3992,7 +3990,6 @@ print_hard_disk_data() if [[ $(( $i % 2 )) -eq 0 ]];then hdd_data=$( create_print_line " " "${hdd_model}${CN}" ) print_screen_output "$hdd_data" - hdd_data='' hdd_model='' fi ;; @@ -4000,7 +3997,7 @@ print_hard_disk_data() fi done # then print any leftover items - if [[ -n $hdd_data ]];then + if [[ -n $hdd_model ]];then hdd_data=$( create_print_line " " "${hdd_model}${CN}" ) print_screen_output "$hdd_data" fi