mirror of
https://git.yoctoproject.org/poky
synced 2026-05-31 12:49:46 +00:00
initscripts: remove warnings on read-only-rootfs (again)
When the populate-volatile.sh initscript tests if a configured symlink is already in place, it uses readlink with the '-f' (follow) option: > [ "$(readlink -f $source)" = "$dest" ] If the test fails, it proceeds to delete the exisiting folder/file, and create the configured symlink. However, the '-f' option to readlink makes it follow symlinks pointing at symlinks. If the $dest argument is a symlink, the above test fails, and warnings are printed due to changing a read-only rootfs. This is the case for /tmp, and /etc/resolv.conf: > /tmp -> /var/tmp -> /var/volatile/tmp > /etc/resolv.conf -> /var/run/resolv.conf -> /run/resolv.conf Fix the warnings by removing the '-f' option, so that the test matches the configuration. [ YOCTO #10814 ] (From OE-Core rev: fb028a0a25c02ab56ad262afd8e6e9495a44673d) Signed-off-by: Martin Hundebøll <martin@geanix.com> Signed-off-by: Jacob Kroon <jacob.kroon@gmail.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
This commit is contained in:
committed by
Richard Purdie
parent
3f5c70649a
commit
4cac7b1553
@@ -80,7 +80,7 @@ mk_dir() {
|
||||
link_file() {
|
||||
EXEC="
|
||||
if [ -L \"$2\" ]; then
|
||||
[ \"\$(readlink -f \"$2\")\" != \"$1\" ] && { rm -f \"$2\"; ln -sf \"$1\" \"$2\"; };
|
||||
[ \"\$(readlink \"$2\")\" != \"$1\" ] && { rm -f \"$2\"; ln -sf \"$1\" \"$2\"; };
|
||||
elif [ -d \"$2\" ]; then
|
||||
if awk '\$2 == \"$2\" {exit 1}' /proc/mounts; then
|
||||
cp -a $2/* $1 2>/dev/null;
|
||||
|
||||
Reference in New Issue
Block a user