Phytec中国的wiki
support@phytec.cn
热线:0755-61802110-803
Page History
首先,需要增加usb自动挂载规则usb和sdcard的自动挂载规则是在/etc/udev/rules.d/11-usb-mount.rules, 参考如下:目录下,
u盘自动挂载规则
Code Block | ||||||
---|---|---|---|---|---|---|
| ||||||
KERNEL!="sd[a-z][0-9]",GOTO="automount_exit" ACTION=="add", SUBSYSTEMS=="usb", SUBSYSTEM=="block",RUN+="/bin/mkdir /mnt/usb",RUN+="/usr/bin/systemd-mount --no-block --automount=yes $devnode /mnt/usb" ACTION=="remove", RUN+="/usr/bin/systemd-umount /mnt/usb",RUN+="/bin/rmdir /mnt/usb" LABEL="automount_exit" |
sdcard自动挂载规则
...
Code Block | ||||||
---|---|---|---|---|---|---|
| ||||||
KERNEL!="mmcblk0p1",GOTO="automount_exit"
ACTION=="add", SUBSYSTEM=="block",RUN+="/bin/mkdir /mnt/sd",RUN+="/usr/bin/systemd-mount --no-block --automount=yes $devnode /mnt/sd"
ACTION=="remove", RUN+="/usr/bin/systemd-umount /mnt/sd",RUN+="/bin/rmdir /mnt/sd"
LABEL="automount_exit" |
...
Overview
Content Tools
Activity
Tasks