Date: Sat, 30 Nov 2019 17:30:01 +0000 (UTC) From: Mateusz Guzik <mjg@FreeBSD.org> To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r355232 - head/libexec/rc/rc.d Message-ID: <201911301730.xAUHU1jH054616@repo.freebsd.org>
next in thread | raw e-mail | index | archive | help
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}}
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201911301730.xAUHU1jH054616>