branch one, fine tuning some config file overrides, moved the sourcing of configs to right under initialize so values set there and

used right after can be overridden prior to the next tests.
This commit is contained in:
inxi-svn 2013-06-14 19:14:00 +00:00
parent 8de553f038
commit 845785be8e

26
inxi
View file

@ -3,7 +3,7 @@
#### Script Name: inxi #### Script Name: inxi
#### Version: 1.9.8 #### Version: 1.9.8
#### Date: June 14 2013 #### Date: June 14 2013
#### Patch Number: 02-b1 #### Patch Number: 03-b1
######################################################################## ########################################################################
#### SPECIAL THANKS #### SPECIAL THANKS
######################################################################## ########################################################################
@ -247,9 +247,6 @@ A_X_DATA=''
# -U and -! testing/advanced update options, as well as removing the -U help menu item # -U and -! testing/advanced update options, as well as removing the -U help menu item
B_ALLOW_UPDATE='true' B_ALLOW_UPDATE='true'
B_ALLOW_WEATHER='true' B_ALLOW_WEATHER='true'
# this handles a fringe case where $DISPLAY is not null even though out of X, for headless
# server use only, change in inxi.conf file to 'false'
B_DO_X_CHECK='true'
## standard boolean flags ## ## standard boolean flags ##
B_BSD_RAID='false' B_BSD_RAID='false'
B_COLOR_SCHEME_SET='false' B_COLOR_SCHEME_SET='false'
@ -595,6 +592,16 @@ main()
# This function just initializes variables # This function just initializes variables
initialize_data initialize_data
# Source global config overrides, needs to be here because some things
# can be reset that were set in initialize, but check_required_apps needs
if [[ -s /etc/$SCRIPT_NAME.conf ]];then
source /etc/$SCRIPT_NAME.conf
fi
# Source user config variables override /etc/inxi.conf variables
if [[ -s $HOME/.$SCRIPT_NAME/$SCRIPT_NAME.conf ]];then
source $HOME/.$SCRIPT_NAME/$SCRIPT_NAME.conf
fi
# Check for dependencies BEFORE running ANYTHING else except above functions # Check for dependencies BEFORE running ANYTHING else except above functions
# Not all distro's have these depends installed by default. Don't want to run # Not all distro's have these depends installed by default. Don't want to run
# this if the user is requesting to see this information in the first place # this if the user is requesting to see this information in the first place
@ -607,14 +614,7 @@ main()
SCRIPT_VERSION_NUMBER=$( parse_version_data 'main' ) SCRIPT_VERSION_NUMBER=$( parse_version_data 'main' )
SCRIPT_PATCH_NUMBER=$( parse_version_data 'patch' ) SCRIPT_PATCH_NUMBER=$( parse_version_data 'patch' )
### Source global config overrides # previous source location, check for bugs
if [[ -s /etc/$SCRIPT_NAME.conf ]];then
source /etc/$SCRIPT_NAME.conf
fi
# Source user config variables override /etc/inxi.conf variables
if [[ -s $HOME/.$SCRIPT_NAME/$SCRIPT_NAME.conf ]];then
source $HOME/.$SCRIPT_NAME/$SCRIPT_NAME.conf
fi
## this needs to run before the KONVI stuff is set below ## this needs to run before the KONVI stuff is set below
## Konversation 1.2 apparently does not like the $PPID test in get_start_client ## Konversation 1.2 apparently does not like the $PPID test in get_start_client
@ -802,7 +802,7 @@ initialize_data()
B_SCSI_FILE='true' B_SCSI_FILE='true'
fi fi
if [[ -n $DISPLAY && $B_DO_X_CHECK == 'true' ]];then if [[ -n $DISPLAY ]];then
B_SHOW_X_DATA='true' B_SHOW_X_DATA='true'
B_RUNNING_IN_X='true' B_RUNNING_IN_X='true'
fi fi