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:
committed by
Lennart Poettering
parent
8f0e73f250
commit
4fc9982cb0
@@ -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;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user