diff --git a/inxi b/inxi index 3e5e8df..50b8ff0 100755 --- a/inxi +++ b/inxi @@ -3932,7 +3932,7 @@ print_hard_disk_data() { eval $LOGFS 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='' + local dev_data='' size_data='' hdd_model='' usb_data='' hdd_name='' divisor=5 # load A_HDD_DATA get_hdd_data_basic @@ -3962,8 +3962,6 @@ print_hard_disk_data() fi dev_data="/dev/${a_hdd_working[0]} " size_data=" ${a_hdd_working[1]}" - hdd_name="${a_hdd_working[2]}" - if [[ $B_EXTRA_DATA == 'true' && -n $dev_data ]];then hdd_temp_data=$( get_hdd_temp_data "$dev_data" ) # error handling is done in get data function @@ -3973,7 +3971,11 @@ print_hard_disk_data() hdd_temp_data='' fi fi - + divisor=2 # for modulus line print out, either 2 items for full, or default for short + fi + hdd_name="${a_hdd_working[2]}" + + if [[ $B_SHOW_DISK == 'true' || $VERBOSITY_LEVEL -ge 3 ]];then 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. @@ -3985,7 +3987,7 @@ print_hard_disk_data() ;; *) # using modulus here, if divisible by 2, print line, otherwise skip - if [[ $(( $i % 2 )) -eq 0 ]];then + if [[ $(( $i % $divisor )) -eq 0 ]];then hdd_data=$( create_print_line " " "${hdd_model}${CN}" ) print_screen_output "$hdd_data" hdd_model=''