summaryrefslogtreecommitdiff
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:51:22 +0100
commit5cd96e28825d345650be878d4b7be4fea2996839 (patch)
tree535d649a70963b469f1d31a90d37847985c6f3a6 /meta/recipes-core/initrdscripts
parent219228805a4d5d822894c8f6c2526e1b9a8609ff (diff)
downloadopenembedded-core-5cd96e28825d345650be878d4b7be4fea2996839.tar.gz
openembedded-core-5cd96e28825d345650be878d4b7be4fea2996839.tar.bz2
openembedded-core-5cd96e28825d345650be878d4b7be4fea2996839.zip
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" 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
fi
mkdir -p /tmp
-cat /proc/mounts > /etc/mtab
+if [ ! -L /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//")