This creates /dev/fd, /dev/stdin, /dev/stdout, /dev/stderr, and
/dev/core as symlinks to /proc on container creation. Except for
/dev/core, these are needed for shells like bash to be fully functional.
---
Supersedes my previous patch which duplicated the logic in dev_setup().
src/nspawn/nspawn.c | 3 +++
1 file changed, 3 insertions(+)
diff --git a/src/nspawn/nspawn.c b/src/nspawn/nspawn.c
index 7d188f0..40b9934 100644
--- a/src/nspawn/nspawn.c
+++ b/src/nspawn/nspawn.c
@@ -53,6 +53,7 @@
#include "path-util.h"
#include "loopback-setup.h"
#include "sd-id128.h"
+#include "dev-setup.h"
typedef enum LinkJournal {
LINK_NO,
@@ -1204,6 +1205,8 @@ int main(int argc, char *argv[]) {
if (copy_devnodes(arg_directory) < 0)
goto child_fail;
+ dev_setup(arg_directory);
+
if (setup_dev_console(arg_directory, console) < 0)
goto child_fail;
--
1.7.11.4
_______________________________________________
systemd-devel mailing list
[email protected]
http://lists.freedesktop.org/mailman/listinfo/systemd-devel