Import from samosa: Another question for hostname? And the other
authorjoey <>
Tue, 2 Nov 2004 19:05:53 +0000 (19:05 +0000)
committerjoey <>
Tue, 2 Nov 2004 19:05:53 +0000 (19:05 +0000)
debianServer attribute

ud-host

diff --git a/ud-host b/ud-host
index 0754add..2e72b7b 100755 (executable)
--- 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);