summaryrefslogtreecommitdiffstats
path: root/meta/recipes-core/initrdscripts
diff options
context:
space:
mode:
authorCristian Iorga <cristian.iorga@intel.com>2014-06-20 18:42:17 +0300
committerRichard Purdie <richard.purdie@linuxfoundation.org>2014-06-23 17:54:30 +0100
commit566cba1f1220a6ccd52fed59c896ba849768525a (patch)
tree851f952108d7fb7876358915a1227fe76c73aed3 /meta/recipes-core/initrdscripts
parent94fea437467f6ebce038214d30086e09f0746b3d (diff)
downloadpoky-566cba1f1220a6ccd52fed59c896ba849768525a.tar.gz
oe-core/init-install-testfs.sh: do not overwrite /etc/mtab if the link already exist
Overwriting of /etc/mtab would fail as below if the /etc/mtab link already exist during installation phase, this patch fix this problem by checking existance of the link before try to overwrite it. Error message during installation if the /etc/mtab exists: "cat: /proc/mounts: input file is output file" (From OE-Core rev: 5cd96e28825d345650be878d4b7be4fea2996839) Signed-off-by: Cristian Iorga <cristian.iorga@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'meta/recipes-core/initrdscripts')
-rw-r--r--meta/recipes-core/initrdscripts/files/init-install-testfs.sh4
1 files changed, 3 insertions, 1 deletions
diff --git a/meta/recipes-core/initrdscripts/files/init-install-testfs.sh b/meta/recipes-core/initrdscripts/files/init-install-testfs.sh
index 6faa233c9f..d2cc6ac534 100644
--- a/meta/recipes-core/initrdscripts/files/init-install-testfs.sh
+++ b/meta/recipes-core/initrdscripts/files/init-install-testfs.sh
@@ -90,7 +90,9 @@ if [ ! -b /dev/loop0 ] ; then
90fi 90fi
91 91
92mkdir -p /tmp 92mkdir -p /tmp
93cat /proc/mounts > /etc/mtab 93if [ ! -L /etc/mtab ]; then
94 cat /proc/mounts > /etc/mtab
95fi
94 96
95disk_size=$(parted /dev/${device} unit mb print | grep Disk | cut -d" " -f 3 | sed -e "s/MB//") 97disk_size=$(parted /dev/${device} unit mb print | grep Disk | cut -d" " -f 3 | sed -e "s/MB//")
96 98