forked from ~ljy/RK356X_SDK_RELEASE

hc
2023-02-13 e440ec23c5a540cdd3f7464e8779219be6fd3d95
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"