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

startup.sh: Ensure SCHEMAS is sorted #193

Merged
merged 1 commit into from
Mar 2, 2018
Merged

startup.sh: Ensure SCHEMAS is sorted #193

merged 1 commit into from
Mar 2, 2018

Conversation

daenney
Copy link
Contributor

@daenney daenney commented Feb 6, 2018

find doesn't sort the output, but if you don't sort it and two schema files are dependent on each other (schema 2 uses an attribute defined in schema 1) the startup of the container will fail if find doesn't happen to return in the order needed. By sorting it you can know/rely on asciibetical sorting to ensure the schema files get included in the right order.

Also, this isn't needed if instead of find you use for f in /path/to/*.schema as the glob already returns in asciibetical order. Makes for one less call to a binary too.

`find` doesn't sort the output, but if you don't sort it and two schema files are dependent on each other (schema 2 uses an attribute defined in schema 1) the startup of the container will fail. By sorting it you can know/rely on asciibetical sorting to ensure the schema files get included in the right order.
@n9yty
Copy link

n9yty commented Feb 6, 2018

I just ran into this trying to import the Apple OpenDirectory schemas, which need some old Samba2 schema, but I could not get it to work until I manually combined the files in the right order, but that is not ideal.

@daenney
Copy link
Contributor Author

daenney commented Feb 6, 2018

@n9yty Hah, that's exactly my problem too.

@BertrandGouny
Copy link
Member

Merged in 1.2.0
thanks and sorry for the delay :)

@daenney
Copy link
Contributor Author

daenney commented Feb 16, 2018

No worries, thanks a lot!

@BertrandGouny BertrandGouny merged commit acfbcc8 into osixia:stable Mar 2, 2018
@daenney daenney deleted the patch-1 branch March 3, 2018 14:48
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants