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.
This commit is contained in:
Dave Reisner
2012-08-21 17:19:38 +02:00
committed by Lennart Poettering
parent 8f0e73f250
commit 4fc9982cb0
+3
View File
@@ -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;