aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKonstantin Belousov <kib@FreeBSD.org>2023-11-18 13:09:30 +0000
committerKonstantin Belousov <kib@FreeBSD.org>2023-11-28 11:40:07 +0000
commit98f8057eaac39c56f049f1f6cebddf8c3860046b (patch)
tree1de733a7b9c7fb4aa2929e3896ef08a5b6a45bf6
parent81a5b2389dcfeef12115e28a24ea68f71e5cc1f3 (diff)
downloadsrc-98f8057eaac39c56f049f1f6cebddf8c3860046b.tar.gz
src-98f8057eaac39c56f049f1f6cebddf8c3860046b.zip
ldconfig: only configure compat32 when kernel supports it
(cherry picked from commit 73902ed85ab73d455d4be8c77336c88a07512230)
-rwxr-xr-xlibexec/rc/rc.d/ldconfig7
1 files changed, 2 insertions, 5 deletions
diff --git a/libexec/rc/rc.d/ldconfig b/libexec/rc/rc.d/ldconfig
index ed3484017d84..beb79ba95b84 100755
--- a/libexec/rc/rc.d/ldconfig
+++ b/libexec/rc/rc.d/ldconfig
@@ -39,10 +39,7 @@ ldconfig_start()
startmsg 'ELF ldconfig path:' ${_LDC}
${ldconfig} -elf ${_ins} ${_LDC}
- machine_arch=$(sysctl -n hw.machine_arch)
-
- case ${machine_arch} in
- aarch64|amd64|powerpc64)
+ if check_kern_features compat_freebsd32; then
for i in ${ldconfig_local32_dirs}; do
if [ -d "${i}" ]; then
_files=`find ${i} -type f`
@@ -67,7 +64,7 @@ ldconfig_start()
startmsg '32-bit compatibility ldconfig path:' ${_LDC}
${ldconfig} -32 ${_ins} ${_LDC}
;;
- esac
+ fi
fi
}