Skip to content

Commit 569e093

Browse files
test
Signed-off-by: Roman Nikitenko <rnikiten@redhat.com>
1 parent 9e75d2e commit 569e093

1 file changed

Lines changed: 10 additions & 13 deletions

File tree

build/scripts/entrypoint-volume.sh

Lines changed: 10 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -60,19 +60,16 @@ get_openssl_version() {
6060

6161
find_runtime_loader() {
6262
runtime_dir="$1"
63-
# Use the linker bundled with the selected assembly to avoid host/container
64-
# shared library drift (e.g. openssl minor updates).
65-
loader=$(find "${runtime_dir}/ld_libs" -maxdepth 1 -name 'ld-linux-*.so*' 2>/dev/null | head -1)
66-
if [ -n "$loader" ]; then
67-
echo "$loader"
68-
return
69-
fi
70-
71-
loader=$(find "${runtime_dir}/ld_libs" -maxdepth 1 -name 'ld-musl-*.so.1' 2>/dev/null | head -1)
72-
if [ -n "$loader" ]; then
73-
echo "$loader"
74-
return
75-
fi
63+
# Use shell globbing instead of `find` so this works in minimal images
64+
# where findutils may be unavailable.
65+
for loader in "${runtime_dir}/ld_libs"/ld-linux-*.so* "${runtime_dir}/ld_libs"/ld-musl-*.so.1; do
66+
if [ -f "$loader" ]; then
67+
echo "$loader"
68+
return 0
69+
fi
70+
done
71+
72+
return 1
7673
}
7774

7875
run_launcher() {

0 commit comments

Comments
 (0)