[PATCH 3/5] Don't create/chmod device nodes in generic rules

Alyssa Ross
2025-11-13T13:27:09Z

These rules shouldn't be making any changes to device
nodes. (Although this is mostly hypothetical since I didn't find any
devices with MODALIAS uevent keys and device nodes.)

Fixes: 88f2695 ("Initial commit")
Fixes: aeb5104 ("Initial commit")
Signed-off-by: Alyssa Ross <hi@alyssa.is>
---
img/app/image/etc/mdev.conf | 2 +-
vm/sys/net/image/etc/mdev.conf | 2 +-
2 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/img/app/image/etc/mdev.conf b/img/app/image/etc/mdev.conf
index 30e17e6..7382067 100644
--- a/img/app/image/etc/mdev.conf
+++ b/img/app/image/etc/mdev.conf
@@ -1,7 +1,7 @@
# SPDX-License-Identifier: EUPL-1.2+
# SPDX-FileCopyrightText: 2021-2023 Alyssa Ross <hi@alyssa.is>

--$MODALIAS=.* 0:0 660 +importas -Siu MODALIAS modprobe -q $MODALIAS
+-$MODALIAS=.* 0:0 0 ! +importas -Siu MODALIAS modprobe -q $MODALIAS
$INTERFACE=.* 0:0 0 ! +/etc/mdev/iface
$MODALIAS=virtio:d0000001Av.* 0:0 0 ! +/etc/mdev/virtiofs
dri/card0 0:0 660 +background { /etc/mdev/listen card0 }
diff --git a/vm/sys/net/image/etc/mdev.conf b/vm/sys/net/image/etc/mdev.conf
index 15f2d01..412f7f5 100644
--- a/vm/sys/net/image/etc/mdev.conf
+++ b/vm/sys/net/image/etc/mdev.conf
@@ -1,5 +1,5 @@
# SPDX-License-Identifier: EUPL-1.2+
# SPDX-FileCopyrightText: 2021 Alyssa Ross <hi@alyssa.is>

--$MODALIAS=.* 0:0 660 +importas -Siu MODALIAS modprobe -q $MODALIAS
+-$MODALIAS=.* 0:0 0 ! +importas -Siu MODALIAS modprobe -q $MODALIAS
$INTERFACE=.* 0:0 0 ! +/etc/mdev/iface
--
2.51.0