1
0
mirror of https://git.yoctoproject.org/poky synced 2026-05-08 05:09:24 +00:00

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>
This commit is contained in:
Cristian Iorga
2014-06-20 18:42:17 +03:00
committed by Richard Purdie
parent 94fea43746
commit 566cba1f12
@@ -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//")