mirror of
https://github.com/troglobit/finit.git
synced 2026-09-30 13:02:37 +07:00
The rules directories were read one after the other, each sorted on its own. udev instead sorts all files from all directories together and lets a file mask one of the same name in a lower priority directory. The difference broke both standard override idioms without a sound: copying a rules file to /etc/udev/rules.d/ to edit it left the original running too, and symlinking a name to /dev/null disabled nothing. Collect everything with glob(), drop entries shadowed by a later directory, and sort the survivors by filename, same as udev and the tmpfiles.d handling in Finit itself. The -r directory sits above /etc/ so a test ruleset can override anything shipped. Signed-off-by: Joachim Wiberg <troglobit@gmail.com>