summaryrefslogtreecommitdiffstats
path: root/ipa-server/ipaserver/bindinstance.py
diff options
context:
space:
mode:
authorRob Crittenden <rcritten@redhat.com>2008-05-28 22:46:08 -0400
committerRob Crittenden <rcritten@redhat.com>2008-05-30 11:20:56 -0400
commitee2b83210bc4446b0f5846fa0fb95822f5a3ece6 (patch)
treefdea030943ef25169148b0b43b2dc0b18e6342fe /ipa-server/ipaserver/bindinstance.py
parentc0bb3ea2a6b49a2786efd3396934d645c860e00c (diff)
downloadfreeipa-ee2b83210bc4446b0f5846fa0fb95822f5a3ece6.tar.gz
freeipa-ee2b83210bc4446b0f5846fa0fb95822f5a3ece6.tar.xz
freeipa-ee2b83210bc4446b0f5846fa0fb95822f5a3ece6.zip
Make check_inst() a standalone function in bindinstance.
When an install instance is created that contains a pointer to a sysrestore point it loads in the current configuration when instantiated. If an instance is instantiated but not used then changes may occur to the system state that it is unaware of. So one needs to take care in the order that things are done to avoid losing information. When bind was setup it was overwriting all data in sysrestore.state and leaving just a [named] section. This caused problems at uninstall. 448173
Diffstat (limited to 'ipa-server/ipaserver/bindinstance.py')
-rw-r--r--ipa-server/ipaserver/bindinstance.py16
1 files changed, 8 insertions, 8 deletions
diff --git a/ipa-server/ipaserver/bindinstance.py b/ipa-server/ipaserver/bindinstance.py
index 3ddbefe1..5badf860 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.")