From 5a04363e46026556ce1e4f39720623ebad0c2efc Mon Sep 17 00:00:00 2001 From: Ossi Herrala Date: Mon, 22 Jul 2013 12:22:27 +0000 Subject: [PATCH] dhcp: Sort results by cn when doing query from LDAP. --- dhcp/files/dhcpdump.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/dhcp/files/dhcpdump.py b/dhcp/files/dhcpdump.py index d4506ba..e691111 100755 --- a/dhcp/files/dhcpdump.py +++ b/dhcp/files/dhcpdump.py @@ -24,7 +24,7 @@ def main(): def ldapsearch(filter): - p = Popen(['ldapsearch', '-x', '-z', '0', '-LLL', filter, 'cn', 'macAddress', 'ipHostNumber'], + p = Popen(['ldapsearch', '-x', '-z', '0', '-S', 'cn', '-LLL', filter, 'cn', 'macAddress', 'ipHostNumber'], bufsize=1024, stdout=PIPE, close_fds=True) ret = [] cur = {}