diff options
author | Cristian Iorga <cristian.iorga@intel.com> | 2014-06-20 18:42:17 +0300 |
---|---|---|
committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2014-06-23 17:54:30 +0100 |
commit | 566cba1f1220a6ccd52fed59c896ba849768525a (patch) | |
tree | 851f952108d7fb7876358915a1227fe76c73aed3 /meta/recipes-core/initrdscripts | |
parent | 94fea437467f6ebce038214d30086e09f0746b3d (diff) | |
download | poky-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.sh | 4 |
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 | |||
90 | fi | 90 | fi |
91 | 91 | ||
92 | mkdir -p /tmp | 92 | mkdir -p /tmp |
93 | cat /proc/mounts > /etc/mtab | 93 | if [ ! -L /etc/mtab ]; then |
94 | cat /proc/mounts > /etc/mtab | ||
95 | fi | ||
94 | 96 | ||
95 | disk_size=$(parted /dev/${device} unit mb print | grep Disk | cut -d" " -f 3 | sed -e "s/MB//") | 97 | disk_size=$(parted /dev/${device} unit mb print | grep Disk | cut -d" " -f 3 | sed -e "s/MB//") |
96 | 98 | ||