]> git.ipfire.org Git - thirdparty/systemd.git/commit
homed: explicitly deactivate all home directories on shutdown
authorLennart Poettering <lennart@poettering.net>
Mon, 21 Sep 2020 16:25:46 +0000 (18:25 +0200)
committerLennart Poettering <lennart@poettering.net>
Wed, 30 Sep 2020 12:37:52 +0000 (14:37 +0200)
commitd1f6e01e4743ae94740314eeb46a162112ef4599
treedcf2a1d9ea84f17554b398f04b522179c624932e
parent626fb9f30195f2b6b25bb1e778096c6e2348ad83
homed: explicitly deactivate all home directories on shutdown

Let's explicitly deactivate all home dirs on shutdown, in order to
properly synchronizing unmounting and avoiding blocking devices.

Previously, we'd rely on automatic deactivation when home directories
become unused. However, that scheme is asynchronous, and ongoing
deactviations might conflicts with attempts to unmount /home. Let's fix
that by providing an explicit service systemd-homed-activate.service
whose only job is to have a ExecStop= line that explicitly deactivates
all home directories on shutdown. This service can the be ordered after
home.mount and similar, ensuring that we'll first deactivate all homes
before deactivating /home itself during shutdown.

This is kept separate from systemd-homed.service so that it is possible
to restart systemd-homed.service without deactivating all home
directories.

Fixes: #16842
man/homectl.xml
man/org.freedesktop.home1.xml
src/home/homectl.c
src/home/homed-home.c
src/home/homed-manager-bus.c
src/home/homed-operation.h
units/meson.build
units/systemd-homed-activate.service [new file with mode: 0644]
units/systemd-homed.service.in