## top-level directory of the distribution or, alternatively, at
## <http://www.OpenLDAP.org/license.html>.
#
-# Strip comments
+# Strip comments, sort attributes. Requires GNU awk
#
+if [ "$BACKEND" != ndb ]; then
grep -v '^#'
+else
+grep -v '^#'| awk 'BEGIN{FS="\n";RS=""} {j=0; for (i=1; i<=NF; i++){ if ($i ~ /^ /){ x[j] = x[j] "\n" $i; } else { j++; x[j] = $i } } print x[1]; delete x[1]; j=asort(x); for (i=1; i<=j; i++){ print x[i]; } delete x; print "" }'
+fi