The current binfnt.d processing does not quite follow the spec. It should be identical to how tmpfiles.d files are processed [1]. In particular, notice the rules of precedence on the referenced page. [1] http://man7.org/linux/man-pages/man5/binfmt.d.5.html
Actually above is the wrong reference for the spec; it is here [1]. In a nutshell, all vendor-provided binfmt files go in /usr/lib/binfmt.d/*.conf, and if a sys admin wants to disable them zero-length versions of them go in /etc/binfmt.d/*.conf. [1] http://0pointer.de/public/systemd-man/binfmt.d.html
I am working on this bug as we speak.
Thanks for working on this. I believe the canonical reference would be the current manpage from systemd, available here: http://www.freedesktop.org/software/systemd/man/binfmt.d.html As of this writing, it is identical to the version on Lennart's website (0pointer.de).
Created attachment 400300 [details, diff] 0001-Fix-binfmt-processing.patch This patch should take care of making sure binfmt files are loaded correctly. correctly. I do not use this facility, so I need testers. Thanks, William
Created attachment 400304 [details, diff] 0001-Fix-binfmt-processing.patch This is an updated version of the patch with a couple of small fixes. - only increment error once and make sure that dryrun actually works.
Created attachment 400306 [details, diff] 0001-Fix-binfmt-processing.patch One more typo fix.
The latest code for this is in a pull request on github so we don't spam the bug with changes [1]. https://github.com/OpenRC/openrc/pull/48
This will be included in openrc-0.14.