From a70dedfa4b0f6a081ea75c3dc46c25be5b69bbe9 Mon Sep 17 00:00:00 2001 From: inxi-svn Date: Tue, 4 Nov 2008 05:39:26 +0000 Subject: [PATCH] cleanup --- inxi | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/inxi b/inxi index f7d47b8..83162fc 100755 --- a/inxi +++ b/inxi @@ -65,6 +65,7 @@ A_X_DATA='' ### Boolean true/false globals # check to make sure initial steps run without error for debugging +# inxi hasn't been 'booted' yet. B_ALL_UP='false' # show extra output data B_EXTRA_DATA='false' @@ -80,7 +81,6 @@ B_TESTING_FLAG='false' B_X_RUNNING='false' ### Variable initializations: constants -# inxi hasn't been 'booted' yet. DCOPOBJ="default" DEBUG=0 # Set debug levels from 1-10 # Debug Buffer Index, index into a debug buffer storing debug messages until inxi is 'all up' @@ -1489,14 +1489,14 @@ print_networking_data() if [[ ${#A_NETWORK_DATA[@]} -le 1 ]];then card_one='Card ' fi - i=0 + if [ -n "${a_network_working[1]}" ];then port_data=" ${C1}at port${C2} ${a_network_working[1]}" fi network_data="${C1}$card_one${C2}${a_network_working[0]}$port_data" network_data=$( create_print_line "Network:" "$network_data" ) print_screen_output "$network_data" - + i=0 ## loop starts with 1 by auto-increment so it only shows cards > 1 while [[ -n ${A_NETWORK_DATA[++i]} ]] do IFS="," @@ -1593,8 +1593,8 @@ print_it_out() ## assemble data for output # load A_HDD_DATA get_hard_drive_data - #: note: if hdd_model is declared prior to use, whatever string you want inserted will - ## be inserted first. In this case, it's desirable to print out (x) before each driver found. + ## note: if hdd_model is declared prior to use, whatever string you want inserted will + ## be inserted first. In this case, it's desirable to print out (x) before each disk found. local hdd_model=${A_HDD_DATA[0]} local hdd_capacity=${A_HDD_DATA[1]} local hdd_used=${A_HDD_DATA[2]}