Files
rpi-tulivision/99-usb-automount.rules

13 lines
709 B
Plaintext

# USB Auto-Mount udev rules for Raspberry Pi Video Player
# These rules automatically mount USB devices when they are inserted
# Mount USB storage devices when added
SUBSYSTEM=="block", KERNEL=="sd*[0-9]", ACTION=="add", RUN+="/opt/video_player/usb_automount.sh add %k"
# Unmount USB storage devices when removed
SUBSYSTEM=="block", KERNEL=="sd*[0-9]", ACTION=="remove", RUN+="/opt/video_player/usb_automount.sh remove %k"
# Alternative rules for different USB device naming patterns
SUBSYSTEM=="block", KERNEL=="mmcblk*[0-9]", ACTION=="add", RUN+="/opt/video_player/usb_automount.sh add %k"
SUBSYSTEM=="block", KERNEL=="mmcblk*[0-9]", ACTION=="remove", RUN+="/opt/video_player/usb_automount.sh remove %k"