Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fixes #18475: add software index in ldap #2380

Conversation

VinceMacBuche
Copy link
Member

if [ ${INDEX_COUNT} -eq 0 ]; then
echo "Adding LDAP index on attribute: software"
sed -i "/index\s*objectClass\s*eq/a index\tsoftware\teq" ${SLAPD_CONF}
NEED_REINDEX=true
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

you need to change also the logic below to check for the new index as well

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

i would simply

  INDEX_BKP_COUNT=$(grep -c "^index\s*software\s*eq" ${SLAPD_CONF_BKP} 2>/dev/null || true)
  if [ ${INDEX_BKP_COUNT} -eq 0 ]; then
    NEED_REINDEX=true
  fi

@VinceMacBuche
Copy link
Member Author

PR updated with a new commit

@Normation-Quality-Assistant
Copy link
Contributor

This PR is not mergeable to upper versions.
Since it is "Ready for merge" you must merge it by yourself using the following command:
rudder-dev merge https://github.com/Normation/rudder-packages/pull/2380
-- Your faithful QA
Kant merge: "Two things awe me most, the starry sky above me and the moral law within me."
(https://ci.normation.com/jenkins/job/merge-accepted-pr/32021/console)

@VinceMacBuche
Copy link
Member Author

OK, squash merging this PR

@VinceMacBuche VinceMacBuche force-pushed the bug_18475/add_software_index_in_ldap branch from 0c5c54e to 29235d3 Compare November 13, 2020 13:02
@VinceMacBuche VinceMacBuche merged commit 29235d3 into Normation:branches/rudder/6.2 Nov 13, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
3 participants