Files
lkl_linux/tools/lkl/systemd/61-lklfuse.rules
David Disseldorp 101d4a4d0f lkl: systemd: fix udev rule to properly filter for USB devs
The previous filter accepted non-usb block devices, which resulted in
unexpected EFI partition mounts. Split the filter and check for
ENV{ID_BUS}!="usb". Tested on systemd-udevd 254 and 257 systems.

Signed-off-by: David Disseldorp <ddiss@suse.de>
2025-11-12 21:04:17 +11:00

20 lines
825 B
Plaintext

SUBSYSTEM!="block", GOTO="lklfuse_end"
ENV{ID_BUS}!="usb", GOTO="lklfuse_end"
#TAG+="lklfuse-dbg-block-filter"
# XXX remove should be handled by systemd service ConditionPathExists for %k
# device node, but it doesn't appear to work, so manually stop.
ACTION=="remove", TAG+="lklfuse-dbg-got-remove", \
RUN+="/usr/bin/systemctl stop lklfuse-mount@%k", GOTO="lklfuse_end"
#TAG+="lklfuse-dbg-remove-filter"
# only support a subset of filesystems on USB devices for now. Btrfs omitted
# from the default set, as lklfuse lacks multi-device support.
ENV{ID_FS_TYPE}!="vfat|exfat|iso9660|udf|xfs|ext4|ext3|ext2", GOTO="lklfuse_end"
#TAG+="lklfuse-dbg-fs-filter"
ACTION=="add", TAG+="systemd", \
OWNER="lklfuse", GROUP="lklfuse", ENV{UDISKS_IGNORE}="1", \
ENV{SYSTEMD_WANTS}+="lklfuse-mount@%k.service"
LABEL="lklfuse_end"