in Linux we often use U disk, SD card mount problem, each time manually mount or uninstall is very troublesome, we can take the following methods to achieve automatic mount or uninstall U disk, SD card
1, first in the/ETC/INIT.D/RSC to add the following statement
Echo/sbin/mdev >/proc/sys/kernel/hotplug
2, under the/etc/resume medv.conf the document, contains the following content
sd[a-z][0-9] 0:0 666 @ (/etc/hotplug/insert.sh $MDEV $SUBSYSTEM)
SD[A-Z] 0:0 666 $ (/etc/hotplug/remove.sh $MDEV $SUBSYSTEM)
UB[A-Z][0-9] 0:0 666 @ (/etc/hotplug/insert.sh $MDEV $SUBSYSTEM)
UB[A-Z] 0:0 666 $ (/etc/hotplug/remove.sh $MDEV $SUBSYSTEM)
MMCBLK[0-9]P[0-9] 0:0 666 @ (/etc/hotplug/insert.sh $MDEV $SUBSYSTEM)
MMCBLK[0-9] 0:0 666 $ (/etc/hotplug/remove.sh $MDEV $SUBSYSTEM)
3, under the/etc/to establish the following folder HotPlug, and in the HotPlug directory to establish the following files, including the following content
insert.sh:
if [-N ' $]; then
if [-b/dev/$1]; Then
if [!-d/media]; then
Mkdir-p/media
Fi
if [!-d/media/$1]; then
Mkdir-p/media/$1
Fi
Mount/dev/$1/media/$1
If [$?-ne 0]; Then
Rm-rf/media/$1
fi
fi
Fi
remove.sh:
mounts=$ (Mount | grep $ | cut-d '-f3)
Umount $MOUNTS
RM-RF $MOUNTS
insert U disk, SD and other devices, you can in the root directory of the/media directory to establish the appropriate folder, mount the correct disk files