diff options
author | Andrew Bartlett <abartlet@samba.org> | 2013-09-16 09:35:39 -0700 |
---|---|---|
committer | Nadezhda Ivanova <nivanova@symas.com> | 2013-09-16 14:43:44 -0700 |
commit | 68f7cd1724480a9bae36692d19b94e10fb1b9e73 (patch) | |
tree | 04b8507aaead3a2188255be6b8ca32c9145374c4 | |
parent | ef830f7e7107cd5287903d83519588c9d31b526f (diff) | |
download | samba-68f7cd1724480a9bae36692d19b94e10fb1b9e73.tar.gz samba-68f7cd1724480a9bae36692d19b94e10fb1b9e73.tar.bz2 samba-68f7cd1724480a9bae36692d19b94e10fb1b9e73.zip |
samba-tool domain provision: Make ldap_backend_startup.sh +x and take optional arguments
Signed-off-by: Andrew Bartlett <abartlet@samba.org>
Reviewed-by: Nadezhda Ivanova <nivanova@symas.com>
-rw-r--r-- | python/samba/provision/backend.py | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/python/samba/provision/backend.py b/python/samba/provision/backend.py index f88b0db89c..3fe947fdbe 100644 --- a/python/samba/provision/backend.py +++ b/python/samba/provision/backend.py @@ -271,12 +271,15 @@ class LDAPBackend(ProvisionBackend): def start(self): from samba.provision import ProvisioningError self.slapd_command_escaped = "\'" + "\' \'".join(self.slapd_command) + "\'" - f = open(os.path.join(self.ldapdir, "ldap_backend_startup.sh"), 'w') + ldap_backend_script = os.path.join(self.ldapdir, "ldap_backend_startup.sh") + f = open(ldap_backend_script, 'w') try: - f.write("#!/bin/sh\n" + self.slapd_command_escaped + "\n") + f.write("#!/bin/sh\n" + self.slapd_command_escaped + " $@\n") finally: f.close() + os.chmod(ldap_backend_script, 0755) + # Now start the slapd, so we can provision onto it. We keep the # subprocess context around, to kill this off at the successful # end of the script |