summaryrefslogtreecommitdiff
path: root/src/nspawn/nspawn.c
diff options
context:
space:
mode:
authorDave Reisner <dreisner@archlinux.org>2012-08-14 20:00:31 -0400
committerLennart Poettering <lennart@poettering.net>2012-08-21 17:19:38 +0200
commit4fc9982cb0499f6502aefc5b8f410658c6d4d261 (patch)
tree040e5f721189fad9eab92c9498b1fc598530c907 /src/nspawn/nspawn.c
parent8f0e73f250f4a397ea07d29a339bd7e64d077612 (diff)
nspawn: add /dev FD symlinks in container setup
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.
Diffstat (limited to 'src/nspawn/nspawn.c')
-rw-r--r--src/nspawn/nspawn.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/src/nspawn/nspawn.c b/src/nspawn/nspawn.c
index 7d188f0712..40b99343d7 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;