svn commit: r355232 - head/libexec/rc/rc.d
Mateusz Guzik
mjg at FreeBSD.org
Sat Nov 30 17:30:02 UTC 2019
Author: mjg
Date: Sat Nov 30 17:30:01 2019
New Revision: 355232
URL: https://svnweb.freebsd.org/changeset/base/355232
Log:
ldconfig: fetch hw.machine_arch only once
This happens to be of significance with poudriere which runs the script a lot
when installing packages.
Modified:
head/libexec/rc/rc.d/ldconfig
Modified: head/libexec/rc/rc.d/ldconfig
==============================================================================
--- head/libexec/rc/rc.d/ldconfig Sat Nov 30 17:24:42 2019 (r355231)
+++ head/libexec/rc/rc.d/ldconfig Sat Nov 30 17:30:01 2019 (r355232)
@@ -40,7 +40,9 @@ ldconfig_start()
check_startmsgs && echo 'ELF ldconfig path:' ${_LDC}
${ldconfig} -elf ${_ins} ${_LDC}
- case `sysctl -n hw.machine_arch` in
+ machine_arch=$(sysctl -n hw.machine_arch)
+
+ case ${machine_arch} in
amd64|mips64|powerpc64)
for i in ${ldconfig_local32_dirs}; do
if [ -d "${i}" ]; then
@@ -62,7 +64,7 @@ ldconfig_start()
;;
esac
- case `sysctl -n hw.machine_arch` in
+ case ${machine_arch} in
armv[67])
for i in ${ldconfig_localsoft_dirs}; do
if [ -d "${i}" ]; then
@@ -85,7 +87,7 @@ ldconfig_start()
esac
# Legacy aout support for i386 only
- case `sysctl -n hw.machine_arch` in
+ case ${machine_arch} in
i386)
# Default the a.out ldconfig path.
: ${ldconfig_paths_aout=${ldconfig_paths}}
More information about the svn-src-all
mailing list