diff options
author | Daan De Meyer <daan.j.demeyer@gmail.com> | 2023-05-11 08:47:38 +0200 |
---|---|---|
committer | Daan De Meyer <daan.j.demeyer@gmail.com> | 2023-05-12 07:48:29 +0200 |
commit | 3f92250f4c10a723693b734b803c98f3b0d53f3e (patch) | |
tree | dbe3993d0e041cccb42b63fc9b1fab8fa774641b /src/core/main.c | |
parent | Merge pull request #27618 from DaanDeMeyer/fstab-generator (diff) | |
download | systemd-3f92250f4c10a723693b734b803c98f3b0d53f3e.tar.xz systemd-3f92250f4c10a723693b734b803c98f3b0d53f3e.zip |
core: Make sure systemctl exit <X> works outside of a container
When running in a VM, we now support propagating the exit status
via a vsock notify socket, so drop the restrictions on propagating
an exit status when not in a container to make sure this works
properly.
Diffstat (limited to '')
-rw-r--r-- | src/core/main.c | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/src/core/main.c b/src/core/main.c index 5274bcc106..e86e0d941e 100644 --- a/src/core/main.c +++ b/src/core/main.c @@ -1515,10 +1515,8 @@ static int become_shutdown(int objective, int retval) { if (log_get_show_time()) command_line[pos++] = "--log-time"; - if (objective == MANAGER_EXIT) { - xsprintf(exit_code, "--exit-code=%d", retval); - command_line[pos++] = exit_code; - } + xsprintf(exit_code, "--exit-code=%d", retval); + command_line[pos++] = exit_code; assert(pos < ELEMENTSOF(command_line)); |