forked from ~ljy/RK356X_SDK_RELEASE

hc
2023-02-18 a08c8b75ee83d7f62c9aefc23bfb42082aa4076c
1
2
3
4
5
6
7
8
9
10
11
KERNEL!="mmcblk*[0-9]", GOTO="sdcard_auto_mount_end"
SUBSYSTEM!="block", GOTO="sdcard_auto_mount_end"
ACTION=="add", PROGRAM!="/sbin/blkid %N", GOTO="sdcard_auto_mount_end"
ATTRS{type}!="SD", GOTO="sdcard_auto_mount_end"
 
IMPORT{program}="/sbin/blkid -o udev -p %N"
 
ACTION=="add", KERNEL=="mmcblk[0-9]p[0-9]", RUN+="/bin/mkdir -p '/mnt/sdcard'", RUN+="/bin/mount -t vfat /dev/%k '/mnt/sdcard'"
ACTION=="remove", RUN+="/bin/umount '/mnt/sdcard'", RUN+="/bin/rm -rf '/mnt/sdcard'"
 
LABEL="sdcard_auto_mount_end"