summaryrefslogtreecommitdiffstats
path: root/src/lib/Server/Admin/Init.py
diff options
context:
space:
mode:
authorRobert Gogolok <gogo@cs.uni-sb.de>2007-12-30 19:53:25 +0000
committerRobert Gogolok <gogo@cs.uni-sb.de>2007-12-30 19:53:25 +0000
commit06eeffe8e6344ac62b74cae38d2733b4b64900f1 (patch)
tree1ecdb4839a089176ffe84864945b9d925da6fd98 /src/lib/Server/Admin/Init.py
parentd57ec8b80f66b1618e0a1b51885a29036effa6e9 (diff)
downloadbcfg2-06eeffe8e6344ac62b74cae38d2733b4b64900f1.tar.gz
bcfg2-06eeffe8e6344ac62b74cae38d2733b4b64900f1.tar.bz2
bcfg2-06eeffe8e6344ac62b74cae38d2733b4b64900f1.zip
bcfg2-admin: use Bcfg2.Settings
git-svn-id: https://svn.mcs.anl.gov/repos/bcfg/trunk/bcfg2@4133 ce84e21b-d406-0410-9b95-82705330c041
Diffstat (limited to 'src/lib/Server/Admin/Init.py')
-rw-r--r--src/lib/Server/Admin/Init.py6
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: