| 1 | # liboverdrop |
| 2 | |
| 3 | [](https://crates.io/crates/liboverdrop) |
| 4 | [](https://docs.rs/liboverdrop) |
| 5 |  |
| 6 | |
| 7 | A simple Rust library to handle configuration fragments. |
| 8 | |
| 9 | This crate provides helpers to scan configuration fragments on disk. |
| 10 | The goal is to help in writing Linux services which are shipped as part of a [Reproducible OS][reproducible]. |
| 11 | Its name derives from **over**lays and **drop**ins (base directories and configuration fragments). |
| 12 | |
| 13 | The main entrypoint is [`scan`](fn.scan.html). It scans |
| 14 | for configuration fragments across multiple directories (with increasing priority), |
| 15 | following these rules: |
| 16 | |
| 17 | * fragments are identified by unique filenames, lexicographically (e.g. `50-default-limits.conf`). |
| 18 | * in case of name duplication, last directory wins (e.g. `/etc/svc/custom.conf` can override `/usr/lib/svc/custom.conf`). |
| 19 | * a fragment symlinked to `/dev/null` is used to ignore any previous fragment with the same filename. |
| 20 | |
| 21 | [reproducible]: http://0pointer.net/blog/projects/stateless.html |
| 22 | |
| 23 | ## License |
| 24 | |
| 25 | Licensed under either of |
| 26 | |
| 27 | * MIT license - <http://opensource.org/licenses/MIT> |
| 28 | * Apache License, Version 2.0 - <http://www.apache.org/licenses/LICENSE-2.0> |
| 29 | |
| 30 | at your option. |