[systemd-devel] RootImage='s implementation

worz worz at tuta.io
Wed Feb 7 06:34:48 UTC 2018


Hi list,After looking at the code that implements the RootImage= directive, I was wondering why it was necessary to do this in PID 1 (code seems to have been partially borrowed from what nspawn uses), and why was RootImage= not internally converted to RootDirectory=/run/some/private/dir/ where this directory is where a small helper binary mounts the image, and this way it could be extended to support a lot of image types without adding code to PID 1. I was first thinking whether it would be possible to use this as a mount unit so that systemd implicitly adds a RequiresMountsFor= for that directory, or adds a dependency on such a transient mount unit. What are other people's thoughts on this, and possibly why this approach was not chosen instead (since I figure this is an implementation detail, things can always be reworked).
Thanks!
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.freedesktop.org/archives/systemd-devel/attachments/20180207/b5a0d25a/attachment.html>


More information about the systemd-devel mailing list