summaryrefslogtreecommitdiff
path: root/source4
diff options
context:
space:
mode:
authorEndi S. Dewata <edewata@redhat.com>2010-01-28 19:35:29 -0600
committerAndrew Bartlett <abartlet@samba.org>2010-03-02 14:07:01 +1100
commit02533c9f1ba9434aabc92fac06995a858874c002 (patch)
tree2db1dbcc27ddf08f87e336ac04abec27e23d0ce3 /source4
parent07669b0704eac9db46e241e681c92b09ee5a4c2e (diff)
downloadsamba-02533c9f1ba9434aabc92fac06995a858874c002.tar.gz
samba-02533c9f1ba9434aabc92fac06995a858874c002.tar.bz2
samba-02533c9f1ba9434aabc92fac06995a858874c002.zip
s4:provision - Use netbios name for FDS instance name.
Signed-off-by: Andrew Bartlett <abartlet@samba.org>
Diffstat (limited to 'source4')
-rw-r--r--source4/scripting/python/samba/provisionbackend.py8
-rw-r--r--source4/setup/fedorads.inf24
2 files changed, 17 insertions, 15 deletions
diff --git a/source4/scripting/python/samba/provisionbackend.py b/source4/scripting/python/samba/provisionbackend.py
index 083f1dc73d..808ecdeb84 100644
--- a/source4/scripting/python/samba/provisionbackend.py
+++ b/source4/scripting/python/samba/provisionbackend.py
@@ -551,6 +551,7 @@ class FDSBackend(LDAPBackend):
self.root = root
self.setup_ds_path = setup_ds_path
+ self.ldap_instance = self.names.netbiosname.lower()
self.sambadn = "CN=Samba"
@@ -596,6 +597,7 @@ class FDSBackend(LDAPBackend):
"DNSDOMAIN": self.names.dnsdomain,
"LDAPDIR": self.paths.ldapdir,
"DOMAINDN": self.names.domaindn,
+ "LDAP_INSTANCE": self.ldap_instance,
"LDAPMANAGERDN": self.names.ldapmanagerdn,
"LDAPMANAGERPASS": self.ldapadminpass,
"SERVERPORT": serverport})
@@ -670,7 +672,7 @@ class FDSBackend(LDAPBackend):
self.credentials.set_bind_dn(self.names.ldapmanagerdn)
# Destory the target directory, or else setup-ds.pl will complain
- fedora_ds_dir = os.path.join(self.paths.ldapdir, "slapd-samba4")
+ fedora_ds_dir = os.path.join(self.paths.ldapdir, "slapd-" + self.ldap_instance)
shutil.rmtree(fedora_ds_dir, True)
self.slapd_provision_command = [self.slapd_path, "-D", fedora_ds_dir, "-i", self.paths.slapdpid]
@@ -678,7 +680,7 @@ class FDSBackend(LDAPBackend):
self.slapd_provision_command.append("-d0")
#the command for the final run is the normal script
- self.slapd_command = [os.path.join(self.paths.ldapdir, "slapd-samba4", "start-slapd")]
+ self.slapd_command = [os.path.join(self.paths.ldapdir, "slapd-" + self.ldap_instance, "start-slapd")]
# If we were just looking for crashes up to this point, it's a
# good time to exit before we realise we don't have Fedora DS on
@@ -699,7 +701,7 @@ class FDSBackend(LDAPBackend):
# Load samba-admin
retcode = subprocess.call([
- os.path.join(self.paths.ldapdir, "slapd-samba4", "ldif2db"), "-s", self.sambadn, "-i", self.samba_ldif],
+ os.path.join(self.paths.ldapdir, "slapd-" + self.ldap_instance, "ldif2db"), "-s", self.sambadn, "-i", self.samba_ldif],
close_fds=True, shell=False)
if retcode != 0:
raise ProvisioningError("ldif2db failed")
diff --git a/source4/setup/fedorads.inf b/source4/setup/fedorads.inf
index f4f92a0697..1243a06c91 100644
--- a/source4/setup/fedorads.inf
+++ b/source4/setup/fedorads.inf
@@ -8,20 +8,20 @@ ldapifilepath=${LDAPDIR}/ldapi
Suffix= ${DOMAINDN}
RootDN= ${LDAPMANAGERDN}
RootDNPwd= ${LDAPMANAGERPASS}
-ServerIdentifier= samba4
+ServerIdentifier= ${LDAP_INSTANCE}
${SERVERPORT}
-inst_dir= ${LDAPDIR}/slapd-samba4
-config_dir= ${LDAPDIR}/slapd-samba4
-schema_dir= ${LDAPDIR}/slapd-samba4/schema
-lock_dir= ${LDAPDIR}/slapd-samba4/lock
-log_dir= ${LDAPDIR}/slapd-samba4/logs
-run_dir= ${LDAPDIR}/slapd-samba4/logs
-db_dir= ${LDAPDIR}/slapd-samba4/db
-bak_dir= ${LDAPDIR}/slapd-samba4/bak
-tmp_dir= ${LDAPDIR}/slapd-samba4/tmp
-ldif_dir= ${LDAPDIR}/slapd-samba4/ldif
-cert_dir= ${LDAPDIR}/slapd-samba4
+inst_dir= ${LDAPDIR}/slapd-${LDAP_INSTANCE}
+config_dir= ${LDAPDIR}/slapd-${LDAP_INSTANCE}
+schema_dir= ${LDAPDIR}/slapd-${LDAP_INSTANCE}/schema
+lock_dir= ${LDAPDIR}/slapd-${LDAP_INSTANCE}/lock
+log_dir= ${LDAPDIR}/slapd-${LDAP_INSTANCE}/logs
+run_dir= ${LDAPDIR}/slapd-${LDAP_INSTANCE}/logs
+db_dir= ${LDAPDIR}/slapd-${LDAP_INSTANCE}/db
+bak_dir= ${LDAPDIR}/slapd-${LDAP_INSTANCE}/bak
+tmp_dir= ${LDAPDIR}/slapd-${LDAP_INSTANCE}/tmp
+ldif_dir= ${LDAPDIR}/slapd-${LDAP_INSTANCE}/ldif
+cert_dir= ${LDAPDIR}/slapd-${LDAP_INSTANCE}
start_server= 0
install_full_schema= 0