]> git.ipfire.org Git - thirdparty/systemd.git/commit
nspawn: make use of the RequestStop logic of scope units
authorLennart Poettering <lennart@poettering.net>
Thu, 23 Nov 2017 18:27:47 +0000 (19:27 +0100)
committerLennart Poettering <lennart@poettering.net>
Thu, 23 Nov 2017 20:47:48 +0000 (21:47 +0100)
commitabdb9b08f6b0da45603a5928eb884a8d012127a7
tree8f328ffd7c2b6eb9c3af6ad317b41c8712a06bf6
parent33fe0afe9af56af67ab72cf407cb41a8628e0e06
nspawn: make use of the RequestStop logic of scope units

Since time began, scope units had a concept of "Controllers", a bus peer
that would be notified when somebody requested a unit to stop. None of
our code used that facility so far, let's change that.

This way, nspawn can print a nice message when somebody invokes
"systemctl stop" on the container's scope unit, and then react with the
right action to shut it down.
src/nspawn/nspawn-register.c
src/nspawn/nspawn-register.h
src/nspawn/nspawn.c