[systemd-devel] [PATCH 2/2] nspawn: add /dev FD symlinks in container setup
Dave Reisner
dreisner at archlinux.org
Tue Aug 14 17:00:31 PDT 2012
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
More information about the systemd-devel
mailing list