Added optional support for -h host in connection with -f
authorjoey <>
Sun, 23 Jan 2005 11:47:13 +0000 (11:47 +0000)
committerjoey <>
Sun, 23 Jan 2005 11:47:13 +0000 (11:47 +0000)
ud-host

diff --git a/ud-host b/ud-host
index 956c046..c90b8e6 100755 (executable)
--- a/ud-host
+++ b/ud-host
@@ -254,7 +254,10 @@ if ListMode == 1:
             Overview(hAttrs)
    sys.exit(0)
 elif FingerPrints == 1:
-   Attrs = l.search_s(HBaseDn,ldap.SCOPE_ONELEVEL,"host=*")
+   if Host is not None:
+      Attrs = l.search_s(HBaseDn,ldap.SCOPE_ONELEVEL,"host=" + Host)
+   else:
+      Attrs = l.search_s(HBaseDn,ldap.SCOPE_ONELEVEL,"host=*")
    hosts = []
    for hAttrs in Attrs:
       hosts.append(hAttrs[1]['host'][0])