diff options
Diffstat (limited to 'src/lib/Server/Admin/Init.py')
-rw-r--r-- | src/lib/Server/Admin/Init.py | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/src/lib/Server/Admin/Init.py b/src/lib/Server/Admin/Init.py index 01bede88e..5131cfb7a 100644 --- a/src/lib/Server/Admin/Init.py +++ b/src/lib/Server/Admin/Init.py @@ -1,6 +1,8 @@ import os, socket import Bcfg2.Server.Admin +from Bcfg2.Settings import settings + config = ''' [server] repository = %s @@ -91,9 +93,9 @@ class Init(Bcfg2.Server.Admin.Mode): def initializeRepo(self, repo, server_uri, password, os_selection): '''Setup a new repo''' - keypath = os.path.dirname(os.path.abspath(self.configfile)) + keypath = os.path.dirname(os.path.abspath(settings.CONFIG_FILE)) confdata = config % ( repo, password, keypath, server_uri ) - open(self.configfile,"w").write(confdata) + open(settings.CONFIG_FILE,"w").write(confdata) # FIXME automate ssl key generation os.popen('openssl req -x509 -nodes -days 1000 -newkey rsa:1024 -out %s/bcfg2.key -keyout %s/bcfg2.key' % (keypath, keypath)) try: |