X-Git-Url: https://git.adam-barratt.org.uk/?a=blobdiff_plain;f=ud-generate;h=b57b0fd2b1c4bf1b9ca19b3451314f6536300bf9;hb=8982c4a13f70a9ff541f7ef33b693b0812feb7a1;hp=1377aafa4a2310ccdba463ff28c3163f69c5135b;hpb=81bd623773e303956c94227b5d541dff29d297d5;p=mirror%2Fuserdir-ldap.git diff --git a/ud-generate b/ud-generate index 1377aaf..b57b0fd 100755 --- a/ud-generate +++ b/ud-generate @@ -1067,6 +1067,8 @@ PasswdAttrs = l.search_s(BaseDn, ldap.SCOPE_ONELEVEL, "uid=*",\ if PasswdAttrs is None: raise UDEmptyList, "No Users" +HostAttrs.sort(lambda x, y: cmp((GetAttr(x, "uid")).lower(), (GetAttr(y, "uid")).lower())) + # Fetch all the hosts HostAttrs = l.search_s(HostBaseDn, ldap.SCOPE_ONELEVEL, "objectClass=debianServer",\ ["hostname", "sshRSAHostKey", "purpose", "allowedGroups", "exportOptions",\