summaryrefslogtreecommitdiffstats
path: root/src/lib/Bcfg2/Server
diff options
context:
space:
mode:
Diffstat (limited to 'src/lib/Bcfg2/Server')
-rw-r--r--src/lib/Bcfg2/Server/Admin/Syncdb.py7
-rw-r--r--src/lib/Bcfg2/Server/Core.py3
2 files changed, 4 insertions, 6 deletions
diff --git a/src/lib/Bcfg2/Server/Admin/Syncdb.py b/src/lib/Bcfg2/Server/Admin/Syncdb.py
index 72d3d469e..bff232b05 100644
--- a/src/lib/Bcfg2/Server/Admin/Syncdb.py
+++ b/src/lib/Bcfg2/Server/Admin/Syncdb.py
@@ -8,12 +8,9 @@ class Syncdb(Bcfg2.Server.Admin.Mode):
__shorthelp__ = ("Sync the Django ORM with the configured database")
__longhelp__ = __shorthelp__ + "\n\nbcfg2-admin syncdb"
__usage__ = "bcfg2-admin syncdb"
- options = {'configfile': Bcfg2.Options.CFILE,
+ options = {'web_configfile': Bcfg2.Options.WEB_CFILE,
'repo': Bcfg2.Options.SERVER_REPOSITORY}
- def __init__(self, setup):
- Bcfg2.Server.Admin.Mode.__init__(self, setup)
-
def __call__(self, args):
import Bcfg2.Server.Admin
Bcfg2.Server.Admin.Mode.__call__(self, args)
@@ -26,7 +23,7 @@ class Syncdb(Bcfg2.Server.Admin.Mode):
# the syncdb command, but we have to wait to set up the
# environment until we've read the config, which has to wait
# until we've parsed options. it's a windy, twisting road.
- Bcfg2.settings.read_config(cfile=self.opts['configfile'],
+ Bcfg2.settings.read_config(cfile=self.opts['web_configfile'],
repo=self.opts['repo'])
setup_environ(Bcfg2.settings)
import Bcfg2.Server.models
diff --git a/src/lib/Bcfg2/Server/Core.py b/src/lib/Bcfg2/Server/Core.py
index 3cb4854bd..377932614 100644
--- a/src/lib/Bcfg2/Server/Core.py
+++ b/src/lib/Bcfg2/Server/Core.py
@@ -106,7 +106,8 @@ class BaseCore(object):
# generate Django ORM settings. this must be done _before_ we
# load plugins
- Bcfg2.settings.read_config(cfile=self.cfile, repo=self.datastore)
+ Bcfg2.settings.read_config(cfile=self.setup['web_configfile'],
+ repo=self.datastore)
self._database_available = False
# verify our database schema