summaryrefslogtreecommitdiffstats
path: root/netdata-installer.sh
diff options
context:
space:
mode:
authorEmmanuel Vasilakis <mrzammler@mm.st>2022-10-04 18:25:12 +0300
committerGitHub <noreply@github.com>2022-10-04 18:25:12 +0300
commit78327ae80f5e7020b74d3b845fd10963fbb5374a (patch)
tree24691f8d146e466a876943f3160427fd0b970e05 /netdata-installer.sh
parent08c3d24f79a14722e5a60998a2b487218abd54b9 (diff)
Use /bin/sh instead of ls to detect glibc (#13758)
* use ln instead of ls to detect glibc * use /bin/sh * remove echo
Diffstat (limited to 'netdata-installer.sh')
-rwxr-xr-xnetdata-installer.sh5
1 files changed, 1 insertions, 4 deletions
diff --git a/netdata-installer.sh b/netdata-installer.sh
index 7b2d24f46a..e2e7c647ce 100755
--- a/netdata-installer.sh
+++ b/netdata-installer.sh
@@ -747,14 +747,11 @@ detect_libc() {
echo >&2 " Detected musl"
libc="musl"
else
- ls_path=$(command -v ls)
- if [ -n "${ls_path}" ] ; then
- cmd=$(ldd "$ls_path" | grep -w libc | cut -d" " -f 3)
+ cmd=$(ldd /bin/sh | grep -w libc | cut -d" " -f 3)
if bash -c "${cmd}" 2>&1 | grep -q -i "GNU C Library"; then
echo >&2 " Detected GLIBC"
libc="glibc"
fi
- fi
fi
if [ -z "$libc" ]; then