projects
/
mirror
/
userdir-ldap.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Improved error message when no key has been found
[mirror/userdir-ldap.git]
/
ud-host
diff --git
a/ud-host
b/ud-host
index
78ca40a
..
1eb8d76
100755
(executable)
--- 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"],
"distribution": ["The distribution version"],
"access": ["all, developer only, restricted"],
"admin": ["Admin email address"],
- "architecture": ["Debian Arhitecture string"],
+ "architecture": ["Debian Ar
c
hitecture string"],
"machine": ["Hardware description"],
"memory": ["Installed RAM"],
"disk": ["Disk Space, RAID levels, etc"],
"machine": ["Hardware description"],
"memory": ["Installed RAM"],
"disk": ["Disk Space, RAID levels, etc"],
@@
-215,7
+215,7
@@
while(1):
# Prompt
Response = raw_input("Change? ");
# 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;
Response == "quit" or Response == "exit"):
break;
@@
-243,9
+243,13
@@
while(1):
if len(NAttrs) != 0:
print "Host",NewHost,"already exists.";
continue;
if len(NAttrs) != 0:
print "Host",NewHost,"already exists.";
continue;
+ NewHostName = raw_input("Hostname? ");
+ if NewHost == "":
+ continue;
Dn = "host=" + NewHost + "," + HBaseDn;
Dn = "host=" + NewHost + "," + HBaseDn;
- l.add_s(Dn,[("host",NewHost),
- ("objectclass","top")]);
+ l.add_s(Dn,[("host", NewHost),
+ ("hostname", NewHostName),
+ ("objectClass", ("top", "debianServer"))]);
# Switch
NAttrs = l.search_s(HBaseDn,ldap.SCOPE_ONELEVEL,"host=" + NewHost);
# Switch
NAttrs = l.search_s(HBaseDn,ldap.SCOPE_ONELEVEL,"host=" + NewHost);