diff options
author | Lennart Poettering <lennart@poettering.net> | 2017-04-29 12:30:29 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2017-04-29 12:30:29 +0200 |
commit | a7c899138358f1a2fda5b62ed73b3d40931422ef (patch) | |
tree | 90dbf5e4c9c30842e1d1dc2267494dc3df914ede /src/nspawn/nspawn.c | |
parent | 1f8476b197e787a0fe237a702902adae53658659 (diff) | |
parent | 399e391fa609e1795c7858eaead7a0592ce24a56 (diff) |
Merge pull request #5801 from keszybz/help-error
nspawn,cgtop: make sure --version, --help always work
Diffstat (limited to 'src/nspawn/nspawn.c')
-rw-r--r-- | src/nspawn/nspawn.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/src/nspawn/nspawn.c b/src/nspawn/nspawn.c index fd00d0957a..905dbc4c74 100644 --- a/src/nspawn/nspawn.c +++ b/src/nspawn/nspawn.c @@ -1158,6 +1158,10 @@ static int parse_argv(int argc, char *argv[]) { arg_caps_retain = (arg_caps_retain | plus | (arg_private_network ? 1ULL << CAP_NET_ADMIN : 0)) & ~minus; + r = cg_unified_flush(); + if (r < 0) + return log_error_errno(r, "Failed to determine whether the unified cgroups hierarchy is used: %m"); + e = getenv("SYSTEMD_NSPAWN_CONTAINER_SERVICE"); if (e) arg_container_service_name = e; @@ -3545,10 +3549,6 @@ int main(int argc, char *argv[]) { log_parse_environment(); log_open(); - r = cg_unified_flush(); - if (r < 0) - return log_error_errno(r, "Failed to determine whether the unified cgroups hierarchy is used: %m"); - /* Make sure rename_process() in the stub init process can work */ saved_argv = argv; saved_argc = argc; |