From 6c6c6528954952e1e323f5a26afd93b99913e6f2 Mon Sep 17 00:00:00 2001 From: Leonardo Sandoval Date: Mon, 3 Aug 2015 15:01:04 +0000 Subject: 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 Signed-off-by: Richard Purdie --- meta/recipes-core/initrdscripts/files/init-install-efi.sh | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) (limited to 'meta/recipes-core/initrdscripts/files/init-install-efi.sh') diff --git a/meta/recipes-core/initrdscripts/files/init-install-efi.sh b/meta/recipes-core/initrdscripts/files/init-install-efi.sh index a3ed74b989..fc4908ef91 100644 --- a/meta/recipes-core/initrdscripts/files/init-install-efi.sh +++ b/meta/recipes-core/initrdscripts/files/init-install-efi.sh @@ -114,7 +114,11 @@ rm -f /etc/udev/scripts/mount* umount ${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 ${device} unit mb print | grep Disk | cut -d" " -f 3 | sed -e "s/MB//") -- cgit v1.2.3