ld-musl-*.so* is a symlink "broken" for the hostsystem, so wildcard
will skip it, causing LD_MUSL_NAME to empty and the ldd symlink pointing
to ../../lib directly.
This causes sysupgrade failing to copy any linked libaries and
consequently failing to run anything after switching to ram disk.
Fix this by creating a symlink directly pointing to where ld-musl-*.so*
points to.
Signed-off-by: Jonas Gorski <jogo@openwrt.org>
SVN-Revision: 43314
The current $(wildcard ...) match might return multiple files which will break subsequent cp commands
with an error like:
cp: target `/home/user/openwrt/staging_dir/target-mips_34kc_uClibc-0.9.33.2/root-ar71xx/tmp-libc/lib/libgcc_s_pic.a' is not a directory
Prevent this issue by only taking the last path returned by globbing.
Signed-off-by: Jo-Philipp Wich <jow@openwrt.org>
SVN-Revision: 41357