summaryrefslogtreecommitdiffstats
path: root/meta/recipes-core/udev
diff options
context:
space:
mode:
authorChen Qi <Qi.Chen@windriver.com>2013-09-10 21:27:55 +0800
committerRichard Purdie <richard.purdie@linuxfoundation.org>2013-09-10 22:58:33 +0100
commit96eff4c25d0c25a302ba556f300587c8899b4d21 (patch)
treefc37d2211e6c404933f2ae55ee8e29dfb277e3db /meta/recipes-core/udev
parent82914e5dfb4ec362ffa2dc683a247b60ab4481af (diff)
downloadpoky-96eff4c25d0c25a302ba556f300587c8899b4d21.tar.gz
mount.sh: automount cdrom device even if no ID_FS_TYPE available
This script was modified to check whether $ID_FS_TYPE is empty before automount, however, for cdrom devices on qemu, the ID_FS_TYPE is not set, yet the device should be mounted. Otherwise, when booting an iso image with runqemu, the boot process hangs at 'waiting for removable media'. This patch fixes this problem by first checking whether the block device is a cdrom. [YOCTO #4487] (From OE-Core rev: 2df21a3b27543df912a3ce05bef2415fae13cb7c) Signed-off-by: Chen Qi <Qi.Chen@windriver.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'meta/recipes-core/udev')
-rw-r--r--meta/recipes-core/udev/udev-extraconf/mount.sh6
1 files changed, 5 insertions, 1 deletions
diff --git a/meta/recipes-core/udev/udev-extraconf/mount.sh b/meta/recipes-core/udev/udev-extraconf/mount.sh
index 327cfc6477..cb57e47a90 100644
--- a/meta/recipes-core/udev/udev-extraconf/mount.sh
+++ b/meta/recipes-core/udev/udev-extraconf/mount.sh
@@ -58,7 +58,11 @@ rm_dir() {
58 fi 58 fi
59} 59}
60 60
61if [ "$ACTION" = "add" ] && [ -n "$DEVNAME" ] && [ -n "$ID_FS_TYPE" ]; then 61# No ID_FS_TYPE for cdrom device, yet it should be mounted
62name="`basename "$DEVNAME"`"
63[ -e /sys/block/$name/device/media ] && media_type=`cat /sys/block/$name/device/media`
64
65if [ "$ACTION" = "add" ] && [ -n "$DEVNAME" ] && [ -n "$ID_FS_TYPE" -o "$media_type" = "cdrom" ]; then
62 if [ -x "$PMOUNT" ]; then 66 if [ -x "$PMOUNT" ]; then
63 $PMOUNT $DEVNAME 2> /dev/null 67 $PMOUNT $DEVNAME 2> /dev/null
64 elif [ -x $MOUNT ]; then 68 elif [ -x $MOUNT ]; then