prepare for use etc as config

This commit is contained in:
chrys 2016-09-14 23:30:00 +02:00
parent 7dad7e413c
commit c7045528df

View File

@ -204,7 +204,7 @@ class settingsManager():
except: except:
return '' return ''
def initFenrirConfig(self, environment = environment.environment, settingsRoot = '/etc/fenrir/config/'): def initFenrirConfig(self, environment = environment.environment, settingsRoot = '/etc/fenrir/config/', settingsFile='settings.conf'):
if not os.path.exists(settingsRoot): if not os.path.exists(settingsRoot):
if os.path.exists('../../config/'): if os.path.exists('../../config/'):
settingsRoot = '../../config/' settingsRoot = '../../config/'
@ -212,7 +212,7 @@ class settingsManager():
return None return None
environment['runtime']['settingsManager'] = self environment['runtime']['settingsManager'] = self
environment['runtime']['debug'] = debug.debug() environment['runtime']['debug'] = debug.debug()
environment = environment['runtime']['settingsManager'].loadSettings(environment) environment = environment['runtime']['settingsManager'].loadSettings(environment, settingsRoot + '/settings/' + settingsFile)
environment = self.setFenrirKeys(environment, self.getSetting(environment, 'general','fenrirKeys')) environment = self.setFenrirKeys(environment, self.getSetting(environment, 'general','fenrirKeys'))
if not os.path.exists(self.getSetting(environment, 'keyboard','keyboardLayout')): if not os.path.exists(self.getSetting(environment, 'keyboard','keyboardLayout')):
if os.path.exists(settingsRoot + 'keyboard/' + self.getSetting(environment, 'keyboard','keyboardLayout')): if os.path.exists(settingsRoot + 'keyboard/' + self.getSetting(environment, 'keyboard','keyboardLayout')):