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:
26a5121e966f465386da4ead40cc558fd877ce2b)
Signed-off-by: Shan Hai <shan.hai@windriver.com>
Signed-off-by: Saul Wold <sgw@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
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//")