diff options
author | Shan Hai <shan.hai@windriver.com> | 2014-06-05 10:18:49 +0800 |
---|---|---|
committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2014-06-10 17:24:19 +0100 |
commit | e922be50b3aaa9366019de927558c9785d7ab0c0 (patch) | |
tree | e6218746fb6477084ea89b305b67c1391cb39bff /meta | |
parent | df956a6dcdf79086517c7c956f1deb7824c222b7 (diff) | |
download | poky-e922be50b3aaa9366019de927558c9785d7ab0c0.tar.gz |
oe-core/init-install.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: 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>
Diffstat (limited to 'meta')
-rw-r--r-- | meta/recipes-core/initrdscripts/files/init-install.sh | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/meta/recipes-core/initrdscripts/files/init-install.sh b/meta/recipes-core/initrdscripts/files/init-install.sh index f84a5eb83b..0a1141a6f5 100644 --- a/meta/recipes-core/initrdscripts/files/init-install.sh +++ b/meta/recipes-core/initrdscripts/files/init-install.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 | ||