mirror of
https://github.com/smxi/inxi.git
synced 2024-11-16 16:21:39 +00:00
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:
parent
8de553f038
commit
845785be8e
26
inxi
26
inxi
|
@ -3,7 +3,7 @@
|
|||
#### Script Name: inxi
|
||||
#### Version: 1.9.8
|
||||
#### Date: June 14 2013
|
||||
#### Patch Number: 02-b1
|
||||
#### Patch Number: 03-b1
|
||||
########################################################################
|
||||
#### SPECIAL THANKS
|
||||
########################################################################
|
||||
|
@ -247,9 +247,6 @@ A_X_DATA=''
|
|||
# -U and -! testing/advanced update options, as well as removing the -U help menu item
|
||||
B_ALLOW_UPDATE='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 ##
|
||||
B_BSD_RAID='false'
|
||||
B_COLOR_SCHEME_SET='false'
|
||||
|
@ -594,6 +591,16 @@ main()
|
|||
|
||||
# This function just initializes variables
|
||||
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
|
||||
# Not all distro's have these depends installed by default. Don't want to run
|
||||
|
@ -607,14 +614,7 @@ main()
|
|||
SCRIPT_VERSION_NUMBER=$( parse_version_data 'main' )
|
||||
SCRIPT_PATCH_NUMBER=$( parse_version_data 'patch' )
|
||||
|
||||
### Source global config overrides
|
||||
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
|
||||
# previous source location, check for bugs
|
||||
|
||||
## 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
|
||||
|
@ -802,7 +802,7 @@ initialize_data()
|
|||
B_SCSI_FILE='true'
|
||||
fi
|
||||
|
||||
if [[ -n $DISPLAY && $B_DO_X_CHECK == 'true' ]];then
|
||||
if [[ -n $DISPLAY ]];then
|
||||
B_SHOW_X_DATA='true'
|
||||
B_RUNNING_IN_X='true'
|
||||
fi
|
||||
|
|
Loading…
Reference in a new issue