procd: setup /dev/stdin, /dev/stdout and /dev/stderr symlinks
Extend the hotplug.json ruleset to setup the common /dev/std{in,out,err} symbolic links which are needed by some applications, e.g. nftables when applying rulesets from stdin. Signed-off-by: Jo-Philipp Wich <jo@mein.io>
This commit is contained in:
parent
507f50df07
commit
50bc06e774
|
@ -7,9 +7,19 @@
|
||||||
[ "has", "MINOR" ]
|
[ "has", "MINOR" ]
|
||||||
],
|
],
|
||||||
[
|
[
|
||||||
|
[ "if",
|
||||||
|
[ "eq", "DEVNAME", "null" ],
|
||||||
|
[
|
||||||
|
[ "makedev", "/dev/%DEVNAME%", "0666" ],
|
||||||
|
[ "exec", "/bin/ln", "-s", "/proc/self/fd/0", "/dev/stdin" ],
|
||||||
|
[ "exec", "/bin/ln", "-s", "/proc/self/fd/1", "/dev/stdout" ],
|
||||||
|
[ "exec", "/bin/ln", "-s", "/proc/self/fd/2", "/dev/stderr" ],
|
||||||
|
[ "return" ]
|
||||||
|
]
|
||||||
|
],
|
||||||
[ "if",
|
[ "if",
|
||||||
[ "eq", "DEVNAME",
|
[ "eq", "DEVNAME",
|
||||||
[ "null", "full", "ptmx", "zero", "tty", "net", "random", "urandom" ]
|
[ "full", "ptmx", "zero", "tty", "net", "random", "urandom" ]
|
||||||
],
|
],
|
||||||
[
|
[
|
||||||
[ "makedev", "/dev/%DEVNAME%", "0666" ],
|
[ "makedev", "/dev/%DEVNAME%", "0666" ],
|
||||||
|
|
Loading…
Reference in New Issue