[oe-commits] [openembedded-core] branch dizzy updated: init-install-efi.sh: Avoid /mnt/mtab creation if already present

git at git.openembedded.org git at git.openembedded.org
Mon Jul 11 22:10:31 UTC 2016


rpurdie pushed a commit to branch dizzy
in repository openembedded-core.

The following commit(s) were added to refs/heads/dizzy by this push:
       new  1679c3d   init-install-efi.sh: Avoid /mnt/mtab creation if already present
1679c3d is described below

commit 1679c3d7bfa1cff4e126e2ed3dff50bdd7c2eeab
Author: Leonardo Sandoval <leonardo.sandoval.gonzalez at linux.intel.com>
AuthorDate: Mon Aug 3 15:01:04 2015 +0000

    init-install-efi.sh: Avoid /mnt/mtab creation if already present
    
    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 at linux.intel.com>
    Signed-off-by: Richard Purdie <richard.purdie at linuxfoundation.org>
    Signed-off-by: Armin Kuster <akuster808 at gmail.com>
---
 meta/recipes-core/initrdscripts/files/init-install-efi.sh | 6 +++++-
 1 file changed, 5 insertions(+), 1 deletion(-)

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//")
 

-- 
To stop receiving notification emails like this one, please contact
the administrator of this repository.


More information about the Openembedded-commits mailing list