diff options
author | Tom Gundersen <teg@jklm.no> | 2012-11-28 17:27:17 +0100 |
---|---|---|
committer | Tom Gundersen <teg@jklm.no> | 2012-11-28 18:26:35 +0100 |
commit | 02eaa78835fb994dbe609296d9b9d0c9b463cc1c (patch) | |
tree | 2d4e5f37d529a959425603fc383a1e642cda71aa /src/core/shutdown.c | |
parent | 8050c22151aeaa8a0029e57bd28fc84d25077e4f (diff) |
shutdown: don't pivot to /run/initramfs if already there
This allows systemd-shutdown to be installed as /run/initramfs/shutdown
and take care of the proper teardown of the rootfs.
Diffstat (limited to 'src/core/shutdown.c')
-rw-r--r-- | src/core/shutdown.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/core/shutdown.c b/src/core/shutdown.c index b59aef174f..4bb4b4d13e 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 && |