aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLeonardo Sandoval <leonardo.sandoval.gonzalez@linux.intel.com>2015-08-03 15:01:04 +0000
committerRichard Purdie <richard.purdie@linuxfoundation.org>2016-07-11 22:22:34 +0100
commit1679c3d7bfa1cff4e126e2ed3dff50bdd7c2eeab (patch)
tree901179dd98dd4fdcb0d58db77f29628778a12eff
parentc50e30cb078ca0ad6f76241f0b0a5557cc17e3c0 (diff)
downloadopenembedded-core-1679c3d7bfa1cff4e126e2ed3dff50bdd7c2eeab.zip
openembedded-core-1679c3d7bfa1cff4e126e2ed3dff50bdd7c2eeab.tar.gz
openembedded-core-1679c3d7bfa1cff4e126e2ed3dff50bdd7c2eeab.tar.bz2
init-install-efi.sh: Avoid /mnt/mtab creation if already presentdizzy
The base-files recipe installs /mnt/mtab (it is a softlink of /proc/mounts), so if an image includes the latter, there is no new to created it again inside the install-efi.sh script, otherwise an error may occur as indicated on the bug's site. [YOCTO #7971] Signed-off-by: Leonardo Sandoval <leonardo.sandoval.gonzalez@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org> Signed-off-by: Armin Kuster <akuster808@gmail.com>
-rw-r--r--meta/recipes-core/initrdscripts/files/init-install-efi.sh6
1 files changed, 5 insertions, 1 deletions
diff --git a/meta/recipes-core/initrdscripts/files/init-install-efi.sh b/meta/recipes-core/initrdscripts/files/init-install-efi.sh
index 329586d..03c2a96 100644
--- a/meta/recipes-core/initrdscripts/files/init-install-efi.sh
+++ b/meta/recipes-core/initrdscripts/files/init-install-efi.sh
@@ -97,7 +97,11 @@ rm -f /etc/udev/scripts/mount*
umount /dev/${device}* 2> /dev/null || /bin/true
mkdir -p /tmp
-cat /proc/mounts > /etc/mtab
+
+# Create /etc/mtab if not present
+if [ ! -e /etc/mtab ]; then
+ cat /proc/mounts > /etc/mtab
+fi
disk_size=$(parted /dev/${device} unit mb print | grep Disk | cut -d" " -f 3 | sed -e "s/MB//")