samba4-ol-mmr
Oliver Liebel
oliver at itc.li
Tue Aug 12 11:40:32 GMT 2008
Andrew Bartlett schrieb:
> When constructing a diff, run diff -u oldfile newfile. This gives me a
> much easier to read diff.
>
okay - see attached new diffs.
> Given the option names you have chosen, try 'ol_mmr'
what do you think about checking only the presence of ol_mmr_url1 (maybe
logical "and-ed" url2).
if values not "none", then all mmr-specific values will be set. so we
dont need [ol_mmr =yes] as choice.
> and 'ol_mmr_url1'
> etc. The name in opts is the name for the long option (eg
> --ol-mmr-url1) with the - replaced by -.
>
....hm, not really. i replaced the values, now i got another error.
"Traceback (most recent call last):
File "setup/provision-backend", line 109, in <module>
ol_mmr_url2=opts.ol_mmr_url2)
TypeError: provision_backend() got an unexpected keyword argument
'ol_mmr_url1'"
> I hope this helps.
>
> Andrew Bartlett
>
>
____________
Virus checked by G DATA AntiVirusKit
Version: AVK 18.4927 from 12.08.2008
Virus news: www.antiviruslab.com
-------------- next part --------------
--- scripting/python/samba/provision.py.bak 2008-08-12 10:35:33.000000000 +0200
+++ scripting/python/samba/provision.py 2008-08-12 13:16:09.000000000 +0200
@@ -76,7 +76,10 @@
self.memberofconf = None
self.fedoradsinf = None
self.fedoradspartitions = None
-
+ self.olmmrconf = None
+ self.olmmrschemaconf = None
+ self.olmmrconfigconf = None
+ self.olmmruserconf = None
class ProvisionNames(object):
def __init__(self):
@@ -244,6 +247,14 @@
"fedorads.inf")
paths.fedoradspartitions = os.path.join(paths.ldapdir,
"fedorads-partitions.ldif")
+ paths.olmmrconf = os.path.join(paths.ldapdir,
+ "ol-mmr.conf")
+ paths.olmmrschemaconf = os.path.join(paths.ldapdir,
+ "ol-mmr-schema.conf")
+ paths.olmmrconfigconf = os.path.join(paths.ldapdir,
+ "ol-mmr-config.conf")
+ paths.olmmruserconf = os.path.join(paths.ldapdir,
+ "ol-mmr-user.conf")
paths.hklm = "hklm.ldb"
paths.hkcr = "hkcr.ldb"
paths.hkcu = "hkcu.ldb"
@@ -1141,7 +1152,8 @@
smbconf=None, targetdir=None, realm=None,
rootdn=None, domaindn=None, schemadn=None, configdn=None,
domain=None, hostname=None, adminpass=None, root=None, serverrole=None,
- ldap_backend_type=None, ldap_backend_port=None):
+ ldap_backend_type=None, ldap_backend_port=None,
+ ol_mmr_url1=None, ol_mmr_url2=None, ):
def setup_path(file):
return os.path.join(setup_dir, file)
@@ -1256,6 +1268,16 @@
refint_config = read_and_sub_file(setup_path("refint.conf"),
{ "LINK_ATTRS" : refint_attributes})
+ if ol_mmr_url1 is not None:
+ ol-mmr_config = read_and_sub_file(setup_path("ol-mmr.conf"),
+ { "LDAPSERVER_1" : ol_mmr_url1},
+ { "LDAPSERVER_2" : ol_mmr_url2})
+
+ if ol_mmr_url1 is not None:
+ ol-mmr_config = read_and_sub_file(setup_path("ol-mmr-schema.conf"),
+ ol-mmr_config = read_and_sub_file(setup_path("ol-mmr-config.conf"),
+ ol-mmr_config = read_and_sub_file(setup_path("ol-mmr-user.conf")
+
setup_file(setup_path("slapd.conf"), paths.slapdconf,
{"DNSDOMAIN": names.dnsdomain,
"LDAPDIR": paths.ldapdir,
-------------- next part --------------
--- setup/provision-backend.bak 2008-08-12 11:46:13.000000000 +0200
+++ setup/provision-backend 2008-08-12 13:31:51.000000000 +0200
@@ -64,6 +64,11 @@
help="Set server role to provision for (default standalone)")
parser.add_option("--targetdir", type="string", metavar="DIR",
help="Set target directory")
+parser.add_option("--ol-mmr-url1", type="string", metavar="LDAPSERVER_1",
+ help="LDAP-URL (DC1) corresponding to Server-ID for Use with OpenLDAP-MMR")
+parser.add_option("--ol-mmr-url2", type="string", metavar="LDAPSERVER_2",
+ help="LDAP-URL (DC2) corresponding to Server-ID for Use with OpenLDAP-MMR")
+
opts = parser.parse_args()[0]
@@ -99,4 +104,7 @@
adminpass=opts.ldap_admin_pass,
root=opts.root, serverrole=server_role,
ldap_backend_type=opts.ldap_backend_type,
- ldap_backend_port=opts.ldap_backend_port)
+ ldap_backend_port=opts.ldap_backend_port,
+ ol_mmr_url1=opts.ol_mmr_url1,
+ ol_mmr_url2=opts.ol_mmr_url2)
+
More information about the samba-technical
mailing list