summaryrefslogtreecommitdiffstats
path: root/ipa-server
diff options
context:
space:
mode:
Diffstat (limited to 'ipa-server')
-rw-r--r--ipa-server/ipa-install/ipa-server-install4
-rw-r--r--ipa-server/ipaserver/bindinstance.py16
2 files changed, 10 insertions, 10 deletions
diff --git a/ipa-server/ipa-install/ipa-server-install b/ipa-server/ipa-install/ipa-server-install
index 9b0baa24c..de1add068 100644
--- a/ipa-server/ipa-install/ipa-server-install
+++ b/ipa-server/ipa-install/ipa-server-install
@@ -365,9 +365,8 @@ def main():
admin_password = ""
# check bind packages are installed
- bind = ipaserver.bindinstance.BindInstance()
if options.setup_bind:
- if not bind.check_inst():
+ if not ipaserver.bindinstance.check_inst():
print "--setup-bind was specified but bind is not installed on the system"
print "Please install bind and restart the setup program"
return 1
@@ -502,6 +501,7 @@ def main():
webgui = ipaserver.httpinstance.WebGuiInstance()
webgui.create_instance()
+ bind = ipaserver.bindinstance.BindInstance(fstore)
bind.setup(host_name, ip_address, realm_name, domain_name)
if options.setup_bind:
bind.create_instance()
diff --git a/ipa-server/ipaserver/bindinstance.py b/ipa-server/ipaserver/bindinstance.py
index 3ddbefe1b..5badf8603 100644
--- a/ipa-server/ipaserver/bindinstance.py
+++ b/ipa-server/ipaserver/bindinstance.py
@@ -28,6 +28,14 @@ import service
from ipa import sysrestore
from ipa import ipautil
+def check_inst():
+ # So far this file is always present in both RHEL5 and Fedora if all the necessary
+ # bind packages are installed (RHEL5 requires also the pkg: caching-nameserver)
+ if not os.path.exists('/etc/named.rfc1912.zones'):
+ return False
+
+ return True
+
class BindInstance(service.Service):
def __init__(self, fstore=None):
service.Service.__init__(self, "named")
@@ -52,14 +60,6 @@ class BindInstance(service.Service):
self.__setup_sub_dict()
- def check_inst(self):
- # So far this file is always present in both RHEL5 and Fedora if all the necessary
- # bind packages are installed (RHEL5 requires also the pkg: caching-nameserver)
- if not os.path.exists('/etc/named.rfc1912.zones'):
- return False
-
- return True
-
def create_sample_bind_zone(self):
bind_txt = ipautil.template_file(ipautil.SHARE_DIR + "bind.zone.db.template", self.sub_dict)
[bind_fd, bind_name] = tempfile.mkstemp(".db","sample.zone.")