mirror of
https://github.com/systemd/systemd-stable.git
synced 2025-01-07 17:17:44 +03:00
nspawn: don't try to unregister a machine we never registered
When registering we condition this on "arg_register". Let's do the same when unregistering, otherwise we might end up trying to unregister a machine we never registered. (cherry picked from commit 0790f4e45f2f8c094bf929aa1fcaf4c7e9dbb001) (cherry picked from commit 6f346ef75635b549166d1be04b1dcb620f1b724c) (cherry picked from commit85804e690d
) (cherry picked from commit342c67d8ab
) (cherry picked from commit3c585568e7
)
This commit is contained in:
parent
43f941cb2b
commit
d764298f15
@ -5301,7 +5301,7 @@ static int run_container(
|
||||
r = wait_for_container(TAKE_PID(*pid), &container_status);
|
||||
|
||||
/* Tell machined that we are gone. */
|
||||
if (bus)
|
||||
if (arg_register && bus)
|
||||
(void) unregister_machine(bus, arg_machine);
|
||||
|
||||
if (r < 0)
|
||||
|
Loading…
Reference in New Issue
Block a user