X-Git-Url: https://git.adam-barratt.org.uk/?a=blobdiff_plain;f=ud-host;h=2e72b7b41d41bf01291e0d606f392a7ed09a514e;hb=19664646ceb4434b7f483c81c864e6d44f654038;hp=78ca40aab73d6a421d21f0836b535c7e157c41d7;hpb=632ee8b5a37aca3e299a9ac48ae53f63bbbe36f4;p=mirror%2Fuserdir-ldap.git diff --git a/ud-host b/ud-host index 78ca40a..2e72b7b 100755 --- a/ud-host +++ b/ud-host @@ -37,7 +37,7 @@ AttrPrompt = {"description": ["Purpose of the machine"], "distribution": ["The distribution version"], "access": ["all, developer only, restricted"], "admin": ["Admin email address"], - "architecture": ["Debian Arhitecture string"], + "architecture": ["Debian Architecture string"], "machine": ["Hardware description"], "memory": ["Installed RAM"], "disk": ["Disk Space, RAID levels, etc"], @@ -215,7 +215,7 @@ while(1): # Prompt Response = raw_input("Change? "); - if (Response == "x" or Response == "X" or Response == "q" or + if (Response == "x" or Response == "X" or Response == "q" or Response == "quit" or Response == "exit"): break; @@ -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);