From 252f241e425bf09ddfb4a824e40403f40da0da1e Mon Sep 17 00:00:00 2001 From: Alyssa Ross Date: Thu, 6 Nov 2025 16:18:19 +0100 Subject: Don't chmod device nodes for ! lines 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 --- src/mdevd/mdevd.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src') diff --git a/src/mdevd/mdevd.c b/src/mdevd/mdevd.c index 3040ba6..aecd5a7 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) -- cgit v1.3.1