[systemd-devel] systemd-shutdown static linking (was: Please proof-read: ...)

Ross Lagerwall rosslagerwall at gmail.com
Tue Jun 11 00:19:17 PDT 2013


On Mon, Jun 10, 2013 at 08:30:40PM +0200, Lennart Poettering wrote:
> Hmm, this is certainly weird. normally -.mount should not have any such
> conflicts. I really wonder where you got those from... What is the
> contents of /run/systemd/generator/-.mount for you?
> 

AFAICT, mount_load_proc_self_mountinfo is called early in the boot
process and it calls mount_add_one for each filesystem in
/proc/self/mounts, including /.
If a unit does not exist already, a new unit is created and
the following lines are called (in mount_add_one):

r = unit_add_dependency_by_name(u, UNIT_BEFORE, SPECIAL_LOCAL_FS_TARGET, NULL, true);
if (r < 0)
        goto fail;

r = unit_add_dependency_by_name(u, UNIT_CONFLICTS, SPECIAL_UMOUNT_TARGET, NULL, true);
if (r < 0)
        goto fail;

While it would be easy to make the conflicts line above conditional on
the mount point not being /, I'm not sure how this interacts with
mount_load which fills in a whole bunch of stuff and
mount_add_default_dependencies which adds a conflict with umount.target
so long as the mount point is not /.

Regards
-- 
Ross Lagerwall


More information about the systemd-devel mailing list