2022-08-12 12:06:08 +00:00
|
|
|
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
|
2020-04-24 23:36:52 +00:00
|
|
|
From: Eelco Dolstra <eelco.dolstra@logicblox.com>
|
|
|
|
Date: Wed, 16 Apr 2014 10:59:28 +0200
|
2022-08-12 12:06:08 +00:00
|
|
|
Subject: [PATCH] Fix NixOS containers
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
|
|
In NixOS containers, the init script is bind-mounted into the
|
|
|
|
container, so checking early whether it exists will fail.
|
|
|
|
---
|
|
|
|
src/nspawn/nspawn.c | 2 ++
|
|
|
|
1 file changed, 2 insertions(+)
|
|
|
|
|
|
|
|
diff --git a/src/nspawn/nspawn.c b/src/nspawn/nspawn.c
|
2023-07-15 17:15:38 +00:00
|
|
|
index 3dabe12672..e5aa4feb1e 100644
|
2020-04-24 23:36:52 +00:00
|
|
|
--- a/src/nspawn/nspawn.c
|
|
|
|
+++ b/src/nspawn/nspawn.c
|
2023-07-15 17:15:38 +00:00
|
|
|
@@ -5638,6 +5638,7 @@ static int run(int argc, char *argv[]) {
|
2020-04-24 23:36:52 +00:00
|
|
|
goto finish;
|
|
|
|
}
|
|
|
|
} else {
|
|
|
|
+#if 0
|
2022-08-12 12:06:08 +00:00
|
|
|
_cleanup_free_ char *p = NULL;
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
|
|
if (arg_pivot_root_new)
|
2023-07-15 17:15:38 +00:00
|
|
|
@@ -5652,6 +5653,7 @@ static int run(int argc, char *argv[]) {
|
2022-08-12 12:06:08 +00:00
|
|
|
"Directory %s doesn't look like it has an OS tree (/usr/ directory is missing). Refusing.", arg_directory);
|
2020-04-24 23:36:52 +00:00
|
|
|
goto finish;
|
|
|
|
}
|
|
|
|
+#endif
|
|
|
|
}
|
|
|
|
|
|
|
|
} else {
|