File tree Expand file tree Collapse file tree 1 file changed +21
-0
lines changed
Expand file tree Collapse file tree 1 file changed +21
-0
lines changed Original file line number Diff line number Diff line change @@ -12,6 +12,24 @@ is_freebsd() {
1212 [ " $( uname -s) " = " FreeBSD" ]
1313}
1414
15+ is_glibc () {
16+ # Prefer glibc-enabled agent (NVML via purego) on linux/amd64 glibc systems.
17+ # Check common dynamic loader paths first (fast + reliable).
18+ for p in \
19+ /lib64/ld-linux-x86-64.so.2 \
20+ /lib/x86_64-linux-gnu/ld-linux-x86-64.so.2 \
21+ /lib/ld-linux-x86-64.so.2; do
22+ [ -e " $p " ] && return 0
23+ done
24+
25+ # Fallback to ldd output if available.
26+ if command -v ldd > /dev/null 2>&1 ; then
27+ ldd --version 2>&1 | grep -qiE ' gnu libc|glibc' && return 0
28+ fi
29+
30+ return 1
31+ }
32+
1533
1634# If SELinux is enabled, set the context of the binary
1735set_selinux_context () {
@@ -598,6 +616,9 @@ echo "Downloading and installing the agent..."
598616OS=$( uname -s | sed -e ' y/ABCDEFGHIJKLMNOPQRSTUVWXYZ/abcdefghijklmnopqrstuvwxyz/' )
599617ARCH=$( detect_architecture)
600618FILE_NAME=" beszel-agent_${OS} _${ARCH} .tar.gz"
619+ if [ " $OS " = " linux" ] && [ " $ARCH " = " amd64" ] && is_glibc; then
620+ FILE_NAME=" beszel-agent_${OS} _${ARCH} _glibc.tar.gz"
621+ fi
601622
602623# Determine version to install
603624if [ " $VERSION " = " latest" ]; then
You can’t perform that action at this time.
0 commit comments