mirror of
https://github.com/systemd/systemd.git
synced 2024-11-01 17:51:22 +03:00
nspawn: move cg_unified_flush() invocation out of parse_argv()
It has nothing to do with argument parsing, and hence shouldn't be there.
This commit is contained in:
parent
2327f95499
commit
5eee829043
@ -1332,10 +1332,6 @@ 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;
|
||||
@ -4226,6 +4222,12 @@ int main(int argc, char *argv[]) {
|
||||
if (r < 0)
|
||||
goto finish;
|
||||
|
||||
r = cg_unified_flush();
|
||||
if (r < 0) {
|
||||
log_error_errno(r, "Failed to determine whether the unified cgroups hierarchy is used: %m");
|
||||
goto finish;
|
||||
}
|
||||
|
||||
r = verify_arguments();
|
||||
if (r < 0)
|
||||
goto finish;
|
||||
|
Loading…
Reference in New Issue
Block a user