From 0cba27a016c8ddfa31c0f3e0ffce8c5b3916f201 Mon Sep 17 00:00:00 2001 From: Francisco Gil Date: Thu, 4 Jan 2024 12:23:58 +0100 Subject: [PATCH] udev: mount only media devices with filesystem on them With this new rule, only the medias that contain a filesystem on them are mounted, filtering several calls to mount.sh. I have checked that this change doesn't increase the boot time at all. https://onedigi.atlassian.net/browse/DEL-8826 Signed-off-by: Francisco Gil --- .../recipes-core/udev/udev-extraconf/automount.rules | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/meta-digi-arm/recipes-core/udev/udev-extraconf/automount.rules b/meta-digi-arm/recipes-core/udev/udev-extraconf/automount.rules index 13b52a676..b20cf9d05 100644 --- a/meta-digi-arm/recipes-core/udev/udev-extraconf/automount.rules +++ b/meta-digi-arm/recipes-core/udev/udev-extraconf/automount.rules @@ -23,8 +23,8 @@ SUBSYSTEM=="block", ENV{ID_PART_ENTRY_NAME}=="recovery*|rootfs*", ACTION=="add", SUBSYSTEM=="mtd", ATTRS{name}=="recovery*", ACTION=="add", GOTO="automount_rules_end" # Media automounting -SUBSYSTEM=="block", ATTRS{name}!="loop*|ram*", ACTION=="add" RUN+="/etc/udev/scripts/mount.sh" -SUBSYSTEM=="block", ATTRS{name}!="loop*|ram*", ACTION=="remove" RUN+="/etc/udev/scripts/mount.sh" -SUBSYSTEM=="block", ATTRS{name}!="loop*|ram*", ACTION=="change", ENV{DISK_MEDIA_CHANGE}=="1" RUN+="/etc/udev/scripts/mount.sh" +SUBSYSTEM=="block", ENV{ID_FS_USAGE}=="filesystem", ACTION=="add", RUN+="/etc/udev/scripts/mount.sh" +SUBSYSTEM=="block", ACTION=="remove", RUN+="/etc/udev/scripts/mount.sh" +SUBSYSTEM=="block", ACTION=="change", ENV{DISK_MEDIA_CHANGE}=="1", RUN+="/etc/udev/scripts/mount.sh" LABEL="automount_rules_end"