summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--python/samba/provision/backend.py7
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