[oe] [PATCH 13/17] initramfs-module-block: use ROOT_DEVICE mountpoint if available
Otavio Salvador
otavio at ossystems.com.br
Mon May 30 14:54:19 UTC 2011
Signed-off-by: Otavio Salvador <otavio at ossystems.com.br>
---
recipes/initrdscripts/files/85-blockboot.sh | 9 +++++++--
.../initrdscripts/initramfs-module-block_1.0.bb | 2 +-
2 files changed, 8 insertions(+), 3 deletions(-)
diff --git a/recipes/initrdscripts/files/85-blockboot.sh b/recipes/initrdscripts/files/85-blockboot.sh
index 7841ac6..07c1c35 100644
--- a/recipes/initrdscripts/files/85-blockboot.sh
+++ b/recipes/initrdscripts/files/85-blockboot.sh
@@ -7,6 +7,11 @@ if [ -e "$ROOT_DEVICE" ]; then
if [ -n "$ROOT_FSTYPE" ]; then
type="-t $ROOT_FSTYPE"
fi
- mount $type "$ROOT_DEVICE" /mnt || fatal "Unable to mount rootfs device"
- BOOT_ROOT=/mnt
+
+ if ! mount | grep -q "$ROOT_DEVICE"; then
+ mount $type "$ROOT_DEVICE" /mnt || fatal "Unable to mount rootfs device"
+ BOOT_ROOT=/mnt
+ else
+ BOOT_ROOT=`expr "$(mount | grep $ROOT_DEVICE)" : '.* on \([^ ]*\)'`
+ fi
fi
diff --git a/recipes/initrdscripts/initramfs-module-block_1.0.bb b/recipes/initrdscripts/initramfs-module-block_1.0.bb
index f7834f0..a21a681 100644
--- a/recipes/initrdscripts/initramfs-module-block_1.0.bb
+++ b/recipes/initrdscripts/initramfs-module-block_1.0.bb
@@ -1,5 +1,5 @@
SRC_URI = "file://85-blockboot.sh"
-PR = "r5"
+PR = "r6"
RDEPENDS_${PN} = "initramfs-uniboot"
DESCRIPTION = "An initramfs module for booting off normal block devices."
--
1.7.1
More information about the Openembedded-devel
mailing list