@@ -447,8 +447,9 @@ def __loadCFGFiles(self):
447
447
Loads possibly several cfg files, in order:
448
448
1. cfg files pointed by DIRACSYSCONFIG env variable (comma-separated)
449
449
2. ~/.dirac.cfg
450
- 3. cfg files specified in addCFGFile calls
451
- 4. cfg files that come from the command line
450
+ 3. DIRAC.rootPath/etc/dirac.cfg
451
+ 4. cfg files specified in addCFGFile calls
452
+ 5. cfg files that come from the command line
452
453
"""
453
454
errorsList = []
454
455
foundCFGFile = False
@@ -467,7 +468,11 @@ def __loadCFGFiles(self):
467
468
foundCFGFile = True
468
469
gConfigurationData .loadFile (os .path .expanduser ("~/.dirac.cfg" ))
469
470
470
- # 3. cfg files specified in addCFGFile calls
471
+ # 3. defaultCFGFile = os.path.join(DIRAC.rootPath, "etc", "dirac.cfg")
472
+ if os .path .isfile (os .path .join (DIRAC .rootPath , "etc" , "dirac.cfg" )):
473
+ foundCFGFile = True
474
+
475
+ # 4. cfg files specified in addCFGFile calls
471
476
for fileName in self .additionalCFGFiles :
472
477
if os .path .isfile (fileName ):
473
478
foundCFGFile = True
@@ -477,7 +482,7 @@ def __loadCFGFiles(self):
477
482
gLogger .debug (f"Could not load file { fileName } : { retVal ['Message' ]} " )
478
483
errorsList .append (retVal ["Message" ])
479
484
480
- # 4 . cfg files that come from the command line
485
+ # 5 . cfg files that come from the command line
481
486
for fileName in self .cliAdditionalCFGFiles :
482
487
if os .path .isfile (fileName ):
483
488
foundCFGFile = True
0 commit comments