From: joey <> Date: Tue, 2 Nov 2004 19:05:53 +0000 (+0000) Subject: Import from samosa: Another question for hostname? And the other X-Git-Tag: debian_userdir-ldap_0-3-7~37 X-Git-Url: https://git.adam-barratt.org.uk/?p=mirror%2Fuserdir-ldap.git;a=commitdiff_plain;h=a025eff465feb1c992bc8e3d0084a3631a81ecd9 Import from samosa: Another question for hostname? And the other debianServer attribute --- diff --git a/ud-host b/ud-host index 0754add..2e72b7b 100755 --- a/ud-host +++ b/ud-host @@ -243,9 +243,13 @@ while(1): if len(NAttrs) != 0: print "Host",NewHost,"already exists."; continue; + NewHostName = raw_input("Hostname? "); + if NewHost == "": + continue; Dn = "host=" + NewHost + "," + HBaseDn; l.add_s(Dn,[("host",NewHost), - ("objectclass","top")]); + ("hostname", NewHostName), + ("objectClass", ("top", "debianServer"))]); # Switch NAttrs = l.search_s(HBaseDn,ldap.SCOPE_ONELEVEL,"host=" + NewHost);