made fully dynamic, prints out every other hard disk, with modulus.

This commit is contained in:
inxi-svn 2009-08-06 23:40:21 +00:00
parent 5aeb40d9da
commit eb603be4ae

17
inxi
View file

@ -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='' hdd_counter=0
local dev_data='' size_data='' hdd_model='' hdd_model_2='' hdd_model_3='' usb_data=''
local hdd_data='' hdd_data_2='' a_hdd_working='' hdd_temp_data=''
local dev_data='' size_data='' hdd_model='' usb_data=''
# load A_HDD_DATA
get_hdd_data_basic
@ -3987,11 +3987,14 @@ print_hard_disk_data()
hdd_data=''
hdd_model=''
;;
2|4|6|8|10|12|14)
hdd_data=$( create_print_line " " "${hdd_model}${CN}" )
print_screen_output "$hdd_data"
hdd_data=''
hdd_model=''
*)
# using modulus here, if divisible by 2, print line, otherwise skip
if [[ $(( $i % 2 )) -eq 0 ]];then
hdd_data=$( create_print_line " " "${hdd_model}${CN}" )
print_screen_output "$hdd_data"
hdd_data=''
hdd_model=''
fi
;;
esac
fi