]> code.ossystems Code Review - openembedded-core.git/commit
busybox-mdev: Support automatic mounting of block devices
authormike.looijmans@topic.nl <mike.looijmans@topic.nl>
Thu, 18 Dec 2014 14:17:31 +0000 (15:17 +0100)
committerRichard Purdie <richard.purdie@linuxfoundation.org>
Fri, 19 Dec 2014 18:06:46 +0000 (18:06 +0000)
commit19073fb991b3e2d2304e55f94e30674adf375197
tree9b918e68c1dc8356f6238e6608b98941dbe7de91
parent11420b0566a6a085c6cb78f3f1495ed9c599e6fd
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/<device>. 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/<device>.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 <mike.looijmans@topic.nl>
Signed-off-by: Ross Burton <ross.burton@intel.com>
meta/recipes-core/busybox/busybox.inc
meta/recipes-core/busybox/busybox_1.22.1.bb
meta/recipes-core/busybox/busybox_git.bb
meta/recipes-core/busybox/files/mdev-mount.sh [new file with mode: 0644]
meta/recipes-core/busybox/files/mdev.conf