Busybox mdev will not chmod the device node when the matched rule contains a '!'. Matching this behaviour makes it possible for a rule to preserve the mode set by the kernel for devices that are created automatically by devtmpfs.
Signed-off-by: Alyssa Ross <[email protected]> --- src/mdevd/mdevd.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/mdevd/mdevd.c b/src/mdevd/mdevd.c index bbef872..bf81c7b 100644 --- a/src/mdevd/mdevd.c +++ b/src/mdevd/mdevd.c @@ -640,7 +640,7 @@ static inline int run_scriptelem (struct uevent_s const *event, scriptelem const break ; } } - if (nodelen && ud->action == ACTION_ADD && ud->mmaj >= 0) + if (elem->movetype != MOVEINFO_NOCREATE && nodelen && ud->action == ACTION_ADD && ud->mmaj >= 0) { if (!makesubdirs(node)) return -1 ; if (dryrun) base-commit: a25ba0f5dff29b8782dbd11741e33ea6bf0f8e26 -- 2.51.0
