diff --git a/dhcp/files/dhcpdump.py b/dhcp/files/dhcpdump.py index 4493269..d4506ba 100755 --- a/dhcp/files/dhcpdump.py +++ b/dhcp/files/dhcpdump.py @@ -24,7 +24,7 @@ def main(): def ldapsearch(filter): - p = Popen(['ldapsearch', '-x', '-LLL', filter, 'cn', 'macAddress', 'ipHostNumber'], + p = Popen(['ldapsearch', '-x', '-z', '0', '-LLL', filter, 'cn', 'macAddress', 'ipHostNumber'], bufsize=1024, stdout=PIPE, close_fds=True) ret = [] cur = {} @@ -35,7 +35,7 @@ def ldapsearch(filter): ret.append('host %s { option host-name "%s"; hardware ethernet %s; fixed-address %s; }' % ( cur["cn"], cur["cn"].split('.')[0], cur["macAddress"], cur["ipHostNumber"])) except KeyError: - print "foo" + print >>sys.stderr, "skipping: %s" % repr(cur) cur = {} continue l = l.split()