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.
This commit is contained in:
+1
-1
@@ -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 &&
|
||||
|
||||
Reference in New Issue
Block a user