From 19073fb991b3e2d2304e55f94e30674adf375197 Mon Sep 17 00:00:00 2001 From: "mike.looijmans@topic.nl" Date: Thu, 18 Dec 2014 15:17:31 +0100 Subject: busybox-mdev: Support automatic mounting of block devices Upon inserting a USB stick or similar device, mdev will run an automounter script that mounts valid partitions on /media/. The script first checks /etc/fstab entries so that mounting on UUID or LABEL or using custom mount options is still possible. If /etc/fstab does not contain particular mount options, the script will create (and remove) the mountpoint automatically. The script also supports full disk partitions (devices without partition table). The following environments can be set in /etc/default/mdev: MDEV_AUTOMOUNT=n (Disables automounting completely) MDEV_AUTOMOUNT_ROOT=/media (Change the mount root location) Automatic mounting for a particular device can be disabled by creating a file "/dev/.nomount". This is helpful in scripts that create partitions for example, and want to perform specific actions which require the device to remain unmounted. A more complex variation (using LABEL based mounts) on this script has been in use in OpenPLi for many years now, and I've used this one on many projects already, so it's about time to push this to mainline. Signed-off-by: Mike Looijmans Signed-off-by: Ross Burton --- meta/recipes-core/busybox/busybox.inc | 1 + 1 file changed, 1 insertion(+) (limited to 'meta/recipes-core/busybox/busybox.inc') diff --git a/meta/recipes-core/busybox/busybox.inc b/meta/recipes-core/busybox/busybox.inc index deb2ee4606..0769d92c50 100644 --- a/meta/recipes-core/busybox/busybox.inc +++ b/meta/recipes-core/busybox/busybox.inc @@ -270,6 +270,7 @@ do_install () { install -m 644 ${WORKDIR}/mdev.conf ${D}${sysconfdir}/mdev.conf install -d ${D}${sysconfdir}/mdev install -m 0755 ${WORKDIR}/find-touchscreen.sh ${D}${sysconfdir}/mdev + install -m 0755 ${WORKDIR}/mdev-mount.sh ${D}${sysconfdir}/mdev fi fi -- cgit v1.2.3