Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 8 additions & 4 deletions ConfigurationSystem/Client/LocalConfiguration.py
Original file line number Diff line number Diff line change
Expand Up @@ -285,13 +285,17 @@ def __parseCommandLine(self):

def __loadCFGFiles(self):
"""
Load ~/.dirac.cfg
Load cfg files specified in addCFGFile calls
Load cfg files with come from the command line
Loads possibly several cfg files, in order:
1. ~/.dirac.cfg
2. cfg files pointed by DIRACSYSCONFIG env variable (comma-separated)
3. cfg files specified in addCFGFile calls
4. cfg files that come from the command line
"""
errorsList = []
if 'DIRACSYSCONFIG' in os.environ:
gConfigurationData.loadFile(os.environ['DIRACSYSCONFIG'])
diracSysConfigFiles = os.environ['DIRACSYSCONFIG'].replace(' ', '').split(',')
for diracSysConfigFile in reversed(diracSysConfigFiles):
gConfigurationData.loadFile(diracSysConfigFile)
gConfigurationData.loadFile(os.path.expanduser("~/.dirac.cfg"))
for fileName in self.additionalCFGFiles:
gLogger.debug("Loading file %s" % fileName)
Expand Down
4 changes: 3 additions & 1 deletion Core/scripts/dirac-install.py
Original file line number Diff line number Diff line change
Expand Up @@ -2188,7 +2188,9 @@ def createBashrc():
if cliParams.userEnvVariables:
lines.extend(['# User-requested variables'])
for envName, envValue in cliParams.userEnvVariables.items():
lines.extend(['export %s=%s' % (envName, envValue)])
lines.extend(['( echo $%s | grep -q $%s ) || export %s=$%s:$%s' % (
envName, envValue,
envName, envName, envValue)])

lines.append('')
f = open(bashrcFile, 'w')
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,7 @@ in the order of preference of the option resolution:
it will be interpreted as a configuration file, if the ``DIRAC_NO_CFG`` environment variable is not set.

*Value of $DIRACSYSCONFIG environment variable*
if the DIRACSYSCONFIG variable is set, it should point to a cfg file (written in *CFG* format)
if the DIRACSYSCONFIG variable is set, it should point to a list of cfg file (written in *CFG* format), comma separated

*$HOME/.dirac.cfg*
This is the file in the user's home directory with the *CFG* format
Expand All @@ -83,4 +83,4 @@ in the order of preference of the option resolution:
The client needing a configuration option is first looking for it in the command line arguments.
If the option is not found, the search continues in the user configuration file, then in the
DIRAC installation configuration file and finally in the Configuration Service. These gives
a flexible mechanism of overriding global options by specific local settings.
a flexible mechanism of overriding global options by specific local settings.
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ DIRAC_VOMSES
Can be set to point to a folder containing VOMSES information. See :ref:`multi_vo_dirac`

DIRACSYSCONFIG
If set, its value should be (the full location on the file system of) a DIRAC cfg file, whose content will be used for the DIRAC configuration
If set, its value should be (the full locations on the file system of) one of more DIRAC cfg file(s) (comma separated), whose content will be used for the DIRAC configuration
(see :ref:`dirac-cs-structure`)

DISABLE_WATCHDOG_CPU_WALLCLOCK_CHECK
Expand Down