diff options
author | Jo-Philipp Wich <jo@mein.io> | 2021-11-18 13:00:09 +0100 |
---|---|---|
committer | Daniel Golle <daniel@makrotopia.org> | 2021-11-23 14:03:39 +0000 |
commit | 50bc06e774f89517f98c89c76a7626f35c3ff659 (patch) | |
tree | b835e8241b73752ffb48dbafce4ef5c8afdf7fbb /package/system | |
parent | 507f50df0771935ee389d383c0543e36f914f949 (diff) | |
download | upstream-50bc06e774f89517f98c89c76a7626f35c3ff659.tar.gz upstream-50bc06e774f89517f98c89c76a7626f35c3ff659.tar.bz2 upstream-50bc06e774f89517f98c89c76a7626f35c3ff659.zip |
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>
Diffstat (limited to 'package/system')
-rw-r--r-- | package/system/procd/files/hotplug.json | 12 |
1 files changed, 11 insertions, 1 deletions
diff --git a/package/system/procd/files/hotplug.json b/package/system/procd/files/hotplug.json index 7e0f129d35..b930b307a4 100644 --- a/package/system/procd/files/hotplug.json +++ b/package/system/procd/files/hotplug.json @@ -8,8 +8,18 @@ ], [ [ "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", [ "eq", "DEVNAME", - [ "null", "full", "ptmx", "zero", "tty", "net", "random", "urandom" ] + [ "full", "ptmx", "zero", "tty", "net", "random", "urandom" ] ], [ [ "makedev", "/dev/%DEVNAME%", "0666" ], |