diff options
author | André Draszik <adraszik@tycoint.com> | 2016-12-20 09:02:40 +0000 |
---|---|---|
committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2016-12-22 08:50:17 +0000 |
commit | d8c62f19da60914ec87618fd46c6df61d693355b (patch) | |
tree | 676374d7ec66560c45d7e0b78ab5d23256585e3b | |
parent | 4f89e47d359ea3ed5e4c8bc433c047763fbf47f7 (diff) | |
download | poky-d8c62f19da60914ec87618fd46c6df61d693355b.tar.gz |
initscripts: populate-volatile: suppress read-only-rootfs warnings
rm: can't remove '/etc/resolv.conf': Read-only file system
ln: /etc/resolv.conf: File exists
/etc/default/volatiles contains an entry:
l root root 0644 /etc/resolv.conf /var/run/resolv.conf
which causes populate-volatile.sh to execute the following in link_file():
if [ -L \"$2\" ]; then
[ \"\$(readlink -f \"$2\")\" != \"\$(readlink -f \"$1\")\" ] && { rm -f \"$2\"; ln -sf \"$1\" \"$2\"; };
elif [ -d \"$2\" ]; then
...
At the time the image is created, /etc/resolv.conf is already a
symlink to /var/run/resolv.conf, but at boot time when
populate-volatiles.sh is run, /var/run/resolv.conf doesn't
exist, causing it to try to rm -f and ln -sf which of course
fails due to the read-only filesystem.
[YOCTO #10814]
(From OE-Core rev: 765ee275f5499254b1f09e394c757072bea5f459)
Signed-off-by: André Draszik <adraszik@tycoint.com>
Signed-off-by: Ross Burton <ross.burton@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
-rwxr-xr-x | meta/recipes-core/initscripts/initscripts-1.0/populate-volatile.sh | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/meta/recipes-core/initscripts/initscripts-1.0/populate-volatile.sh b/meta/recipes-core/initscripts/initscripts-1.0/populate-volatile.sh index cf0d2bf966..22a71ecaae 100755 --- a/meta/recipes-core/initscripts/initscripts-1.0/populate-volatile.sh +++ b/meta/recipes-core/initscripts/initscripts-1.0/populate-volatile.sh | |||
@@ -70,7 +70,7 @@ mk_dir() { | |||
70 | link_file() { | 70 | link_file() { |
71 | EXEC=" | 71 | EXEC=" |
72 | if [ -L \"$2\" ]; then | 72 | if [ -L \"$2\" ]; then |
73 | [ \"\$(readlink -f \"$2\")\" != \"\$(readlink -f \"$1\")\" ] && { rm -f \"$2\"; ln -sf \"$1\" \"$2\"; }; | 73 | [ \"\$(readlink -f \"$2\")\" != \"$1\" ] && { rm -f \"$2\"; ln -sf \"$1\" \"$2\"; }; |
74 | elif [ -d \"$2\" ]; then | 74 | elif [ -d \"$2\" ]; then |
75 | if awk '\$2 == \"$2\" {exit 1}' /proc/mounts; then | 75 | if awk '\$2 == \"$2\" {exit 1}' /proc/mounts; then |
76 | cp -a $2/* $1 2>/dev/null; | 76 | cp -a $2/* $1 2>/dev/null; |