summaryrefslogtreecommitdiff
path: root/source4/setup/provision
diff options
context:
space:
mode:
authorAndrew Bartlett <abartlet@samba.org>2007-10-01 21:08:06 +0000
committerGerald (Jerry) Carter <jerry@samba.org>2007-10-10 15:07:37 -0500
commit43890c4c58d6323697d8005911e9f3c91bbd4055 (patch)
treed98409bc944bb6e161419bfbb9599fe984ec7994 /source4/setup/provision
parentb6678a276cdf0dde4848175d165b7ca62f73bce5 (diff)
downloadsamba-43890c4c58d6323697d8005911e9f3c91bbd4055.tar.gz
samba-43890c4c58d6323697d8005911e9f3c91bbd4055.tar.bz2
samba-43890c4c58d6323697d8005911e9f3c91bbd4055.zip
r25451: Rework the display of provision options to use printf syntax, and
avoid %s in the substituted strings from becoming a problem. Andrew Bartlett (This used to be commit 3c4f107239eb6b2f4022a4eac06c5dd3ace71174)
Diffstat (limited to 'source4/setup/provision')
-rwxr-xr-xsource4/setup/provision32
1 files changed, 22 insertions, 10 deletions
diff --git a/source4/setup/provision b/source4/setup/provision
index b204fc9e51..bf03026987 100755
--- a/source4/setup/provision
+++ b/source4/setup/provision
@@ -88,8 +88,8 @@ provision [options]
--partitions-only Configure Samba's partitions, but do not modify them (ie, join a BDC)
--ldap-base output only an LDIF file, suitable for creating an LDAP baseDN
--ldap-backend LDAPSERVER LDAP server to use for this provision
- --ldap-module= MODULE LDB mapping module to use for the LDAP backend
- --aci= ACI An arbitary LDIF fragment, particularly useful to loading a backend ACI value into a target LDAP server
+ --ldap-module MODULE LDB mapping module to use for the LDAP backend
+ --aci ACI An arbitary LDIF fragment, particularly useful to loading a backend ACI value into a target LDAP server
You must provide at least a realm and domain
");
@@ -169,14 +169,26 @@ if (ldapbase) {
provision(subobj, message, blank, paths, system_session, creds, ldapbackend);
provision_dns(subobj, message, paths, system_session, creds);
message("To reproduce this provision, run with:\n");
- message("--realm='" + subobj.REALM_CONF + "' --domain='" + subobj.DOMAIN_CONF + "' --domain-guid='" + subobj.DOMAINGUID + "' \\\n");
- message("--policy-guid='" + subobj.POLICYGUID + "' --host-name='" + subobj.HOSTNAME + "' --host-ip='" + subobj.HOSTIP + "' \\\n");
- message("--host-guid='" + subobj.HOSTGUID + "' --invocationid='" + subobj.INVOCATIONID + "' \\\n");
- message("--adminpass='" + subobj.ADMINPASS + "' --krbtgtpass='" + subobj.KRBTGTPASS + "' \\\n");
- message("--machinepass='" + subobj.MACHINEPASS + "' --dnspass='" + subobj.DNSPASS + "' \\\n");
- message("--root='" + subobj.ROOT + "' --nobody='" + subobj.NOBODY + "' --nogroup-'" + subobj.NOGROUP + "' \\\n");
- message("--wheel='" + subobj.WHEEL + "' --users='" + subobj.USERS + "' --server-role='" + subobj.SERVERROLE + "' \\\n");
- message("--ldap-backend='" + subobj.LDAPBACKEND + "' --ldap-mdoule='" + subobj.LDAPMODULE + "' \\\n");
+/* There has to be a better way than this... */
+ message("--realm='%s' --domain='%s' \\\n", subobj.REALM_CONF, subobj.DOMAIN_CONF);
+ if (subobj.DOMAINGUID != undefined) {
+ message("--domain-guid='%s' \\\n", subobj.DOMAINGUID);
+ }
+ if (subobj.HOSTGUID != undefined) {
+ message("--host-guid='%s' \\\n", subobj.HOSTGUID);
+ }
+ message("--policy-guid='%s' --host-name='%s' --host-ip='%s' \\\n", subobj.POLICYGUID, subobj.HOSTNAME, subobj.HOSTIP);
+ message("--invocationid='%s' \\\n", subobj.INVOCATIONID);
+ message("--adminpass='%s' --krbtgtpass='%s' \\\n", subobj.ADMINPASS, subobj.KRBTGTPASS);
+ message("--machinepass='%s' --dnspass='%s' \\\n", subobj.MACHINEPASS, subobj.DNSPASS);
+ message("--root='%s' --nobody='%s' --nogroup-'%s' \\\n", subobj.ROOT, subobj.NOBODY, subobj.NOGROUP);
+ message("--wheel='%s' --users='%s' --server-role='%s' \\\n", subobj.WHEEL, subobj.USERS, subobj.SERVERROLE);
+ if (ldapbackend) {
+ message("--ldap-backend='%s' \\\n", subobj.LDAPBACKEND);
+ }
+ if (ldapmodule) {
+ message("--ldap-mdoule='%s' \\\n", + subobj.LDAPMODULE);
+ }
message("--aci='" + subobj.ACI + "' \\\n")
}