in_container = detect_container(NULL) > 0;
- need_umount = true;
+ need_umount = !in_container;
need_swapoff = !in_container;
need_loop_detach = !in_container;
need_dm_detach = !in_container;
access("/run/initramfs/shutdown", X_OK) == 0) {
r = switch_root_initramfs();
if (r >= 0) {
- arguments[0] = (char*) "/shutdown";
+ argv[0] = (char*) "/shutdown";
setsid();
make_console_stdio();
log_info("Successfully changed into root pivot.\n"
"Returning to initrd...");
- execv("/shutdown", arguments);
+ execv("/shutdown", argv);
log_error("Failed to execute shutdown binary: %m");
} else
log_error("Failed to switch root to \"/run/initramfs\": %s", strerror(-r));