projects
/
openwrt
/
staging
/
jow.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
507f50d
)
procd: setup /dev/stdin, /dev/stdout and /dev/stderr symlinks
author
Jo-Philipp Wich
<jo@mein.io>
Thu, 18 Nov 2021 12:00:09 +0000
(13:00 +0100)
committer
Daniel Golle
<daniel@makrotopia.org>
Tue, 23 Nov 2021 14:03:39 +0000
(14:03 +0000)
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>
package/system/procd/files/hotplug.json
patch
|
blob
|
history
diff --git
a/package/system/procd/files/hotplug.json
b/package/system/procd/files/hotplug.json
index 7e0f129d356515c15fd43cd0c540d5cdc6ecf259..b930b307a4f3cb34bc3346192987f95ff3f27e31 100644
(file)
--- a/
package/system/procd/files/hotplug.json
+++ b/
package/system/procd/files/hotplug.json
@@
-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",
[ "eq", "DEVNAME",
[ "if",
[ "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" ],