diff --git a/inxi b/inxi index 1b3d20e..e04a5a2 100755 --- a/inxi +++ b/inxi @@ -1,8 +1,8 @@ #!/bin/bash ######################################################################## #### Script Name: inxi -#### version: 1.7.3 -#### Date: June 19 2011 +#### version: 1.7.4 +#### Date: June 20 2011 #### Patch Number: 00 ######################################################################## #### SPECIAL THANKS @@ -48,7 +48,7 @@ #### then find what package owns that application file. #### DEPENDENCIES #### bash >=3.0 (bash); df, readlink, stty, tr, uname, wc (coreutils); -#### gawk (gawk); grep (grep); hostname (hostname); lspci (pciutils); +#### gawk (gawk); grep (grep); lspci (pciutils); #### free, ps, uptime (procps); #### Also the proc filesystem should be present and mounted #### @@ -525,9 +525,10 @@ main() # note: this needs to go AFTER depends check because these use gawk # Do this after sourcing of config overrides so user can customize banwords # Contrary to my previous belief, "${ARR[@]}" passes a quoted list, not one string - BAN_LIST_NORMAL=$( make_ban_lists "${A_NORMAL_BANS[@]}" ) + BAN_LIST_NORMAL=$( make_ban_lists "${A_NORMAL_BANS[@]}" ) BAN_LIST_CPU=$( make_ban_lists "${A_CPU_BANS[@]}" ) - ##echo "BAN_LIST_NORMAL='$BAN_LIST_NORMAL'" + # echo "BAN_LIST_NORMAL='$BAN_LIST_NORMAL'" + # echo "BAN_LIST_CPU='$BAN_LIST_CPU'" # first init function must be set first for colors etc. Remember, no debugger # stuff works on this function unless you set the debugging flag manually. @@ -789,7 +790,7 @@ check_script_depends() eval $LOGFS local app_name='' app_path='' # bc removed from deps for now - local depends="df free gawk grep hostname lspci ps readlink tr uname uptime wc" + local depends="df free gawk grep lspci ps readlink tr uname uptime wc" # no need to add xprop because it will just give N/A if not there, but if we expand use of xprop, # should add that here as a test, then use the B_SHOW_X_DATA flag to trigger the tests in de function local x_apps="xrandr xdpyinfo glxinfo" @@ -1290,7 +1291,7 @@ script_self_updater() debug_data_collector() { local xiin_app='' xiin_data_file='' xiin_download='' inxi_args='' - local xiin_data_dir="inxi-$(hostname | tr ' ' '-' | tr '[A-Z]' '[a-z]' )-$1-$(date +%Y%m%d)" + local xiin_data_dir="inxi-$(tr ' ' '-' <<< $HOSTNAME | tr '[A-Z]' '[a-z]' )-$1-$(date +%Y%m%d)" if [[ $B_RUNNING_IN_SHELL == 'true' ]];then echo "Starting debugging data collection type: $1" @@ -1495,7 +1496,6 @@ check_recommends_items() free:procps~procps~procps~:system_memory gawk:gawk~gawk~gawk~:core_tool grep:grep~grep~grep~:string_search - hostname:hostname~coreutils~hostname~: lspci:pciutils~pciutils~pciutils~:hardware_data ps:procps~procps~procps~:process_data readlink:coreutils~coreutils~coreutils~: @@ -7374,7 +7374,7 @@ print_system_data() eval $LOGFS local system_data='' bits='' desktop_environment='' local host_kernel_string='' de_distro_string='' host_string='' desktop_type='Desktop' - local host_name=$( hostname ) + local host_name=$HOSTNAME local current_kernel=$( uname -rm ) # | gawk '{print $1,$3,$(NF-1)}' ) local distro="$( get_distro_data )" local tty_session=$( basename "$( tty 2>/dev/null )" | sed 's/[^0-9]*//g' ) @@ -7408,14 +7408,14 @@ print_system_data() else bits="(32 bit$gcc_string)" fi - if [[ $B_SHOW_HOST == 'true' ]];then + if [[ -z $HOSTNAME ]];then + host_name='N/A' + fi host_string="${C1}Host${C2} $host_name " system_data=$( create_print_line "System:" "${C1}Host${C2} $host_name ${C1}Kernel${C2}" ) fi - host_kernel_string="$host_string${C1}Kernel${C2} $current_kernel $bits " - if [[ $( calculate_line_length "$host_kernel_string$de_distro_string" ) -lt $LINE_MAX ]];then system_data="$host_kernel_string$de_distro_string" system_data=$( create_print_line "System:" "$system_data" )