mirror of
https://github.com/smxi/inxi.git
synced 2024-11-17 00:31:19 +00:00
adding a fallback to use hostname if $HOSTNAME is null, if all these fail, host name will be set to N/A, which also, as with other uses of
that, serves as a convenient bug reporter for user output
This commit is contained in:
parent
3839656174
commit
6024b3b387
7
inxi
7
inxi
|
@ -7410,7 +7410,12 @@ print_system_data()
|
|||
fi
|
||||
if [[ $B_SHOW_HOST == 'true' ]];then
|
||||
if [[ -z $HOSTNAME ]];then
|
||||
host_name='N/A'
|
||||
if [[ -n $( type p hostname ) ]];then
|
||||
host_name=$( hostname )
|
||||
fi
|
||||
if [[ -z $host_name ]];then
|
||||
host_name='N/A'
|
||||
fi
|
||||
fi
|
||||
host_string="${C1}Host${C2} $host_name "
|
||||
system_data=$( create_print_line "System:" "${C1}Host${C2} $host_name ${C1}Kernel${C2}" )
|
||||
|
|
Loading…
Reference in a new issue