summaryrefslogtreecommitdiff
path: root/src/core/shutdown.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/core/shutdown.c')
-rw-r--r--src/core/shutdown.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/core/shutdown.c b/src/core/shutdown.c
index b59aef174..4bb4b4d13 100644
--- a/src/core/shutdown.c
+++ b/src/core/shutdown.c
@@ -263,7 +263,7 @@ int main(int argc, char *argv[]) {
arguments[2] = NULL;
execute_directory(SYSTEM_SHUTDOWN_PATH, NULL, arguments);
- if (!in_container &&
+ if (!in_container && !in_initrd() &&
access("/run/initramfs/shutdown", X_OK) == 0) {
if (prepare_new_root() >= 0 &&