added some debugger stuff for -i, also a -xx@ 15 switch to trigger that. Won't be used

except for specific ip related issues.

Also changed ip: to ip-v4 to be more accurate.
This commit is contained in:
Harald Hope 2016-01-30 11:36:38 -08:00
parent 305f8beda6
commit 1963fad67e

19
inxi
View file

@ -293,6 +293,8 @@ B_DBUS_CLIENT='false'
B_DCOP='false'
# Debug flood override: make 'true' to allow long debug output
B_DEBUG_FLOOD='false'
# for special -i debugging cases
B_DEBUG_I='false'
B_DMIDECODE_SET='false'
# show extra output data
B_EXTRA_DATA='false'
@ -1649,7 +1651,11 @@ debug_data_collector()
local Line='-------------------------' root_string=''
local start_directory=$( pwd )
local host=$( tr '[A-Z]' '[a-z]' <<< "$HOSTNAME" )
local downloader_error=0
local downloader_error=0 debug_i=''
if [[ $B_DEBUG_I == 'true' ]];then
debug_i='i'
fi
if [[ -n $host ]];then
host=${host// /-}
@ -2056,7 +2062,7 @@ debug_data_collector()
echo 'Creating inxi output file now. This can take a few seconds...'
echo "Starting $SCRIPT_NAME from: $start_directory"
cd $start_directory
$SCRIPT_PATH/$SCRIPT_NAME -FRfrploudmxxx -c 0 -@ 8 -y 120 > $SCRIPT_DATA_DIR/$debug_data_dir/inxi-FRfrploudmxxxy120.txt
$SCRIPT_PATH/$SCRIPT_NAME -F${debug_i}Rfrploudmxxx -c 0 -@ 8 -y 120 > $SCRIPT_DATA_DIR/$debug_data_dir/inxi-F${debug_i}Rfrploudmxxxy120.txt
cp $LOG_FILE $SCRIPT_DATA_DIR/$debug_data_dir
if [[ -f $SCRIPT_DATA_DIR/$debug_data_dir.tar.gz ]];then
echo "Found and removing previous tar.gz data file: $debug_data_dir.tar.gz"
@ -2776,7 +2782,7 @@ get_parameters()
LOGFE=$LOGFE_STRING
create_rotate_logfiles # create/rotate logfiles before we do anything else
;;
11|12|13|14)
11|12|13|14|15)
case $OPTARG in
11)
debug_data_type='sys'
@ -2790,6 +2796,10 @@ get_parameters()
14)
debug_data_type='all'
;;
15)
debug_data_type='all'
B_DEBUG_I='true'
;;
esac
initialize_data
debug_data_collector $debug_data_type
@ -7545,7 +7555,6 @@ get_networking_local_ip_data()
}
# get_networking_local_ip_data;exit
# get_networking_local_ip_data;exit
get_optical_drive_data()
{
eval $LOGFS
@ -12690,7 +12699,7 @@ print_networking_ip_data()
if_ip=${a_interfaces_working[1]}
fi
fi
if_ip_string=" ${C1}ip$SEP3${C2} $if_ip"
if_ip_string=" ${C1}ip-v4$SEP3${C2} $if_ip"
if [[ $B_EXTRA_DATA == 'true' ]];then
if [[ -n ${a_interfaces_working[3]} ]];then
if [[ $B_OUTPUT_FILTER == 'true' ]];then