From af7a0fc700039ac42e72fccdabeff9e31798c91f Mon Sep 17 00:00:00 2001 From: tb <> Date: Mon, 17 Jul 2017 18:16:14 +0000 Subject: [PATCH] Now that choosing the library versions is much faster, we can do it after remounting the filesystem containing /usr/lib as rw: the former is pointless if the latter should happen to fail. From Klemens Nanni ok rpe --- src/etc/rc | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/src/etc/rc b/src/etc/rc index 56a0f2bf..b7e5dd70 100644 --- a/src/etc/rc +++ b/src/etc/rc @@ -1,4 +1,4 @@ -# $OpenBSD: rc,v 1.508 2017/07/17 12:02:53 tb Exp $ +# $OpenBSD: rc,v 1.509 2017/07/17 18:16:14 tb Exp $ # System startup script run by init on autoboot or after single-user. # Output and error are redirected to console by init, and the console is the @@ -170,12 +170,6 @@ reorder_libs() { echo -n 'reordering libraries:' - # Only choose the latest version of the libraries. - for _liba in /usr/lib/lib{c,crypto}; do - _libas="$_libas $(ls $_liba.so.+([0-9.]).a | sort -V | tail -1)" - done - _libas=${_libas# } - # Remount read-write, if /usr/lib is on a read-only ffs filesystem. if [[ $_mp == *' type ffs '*'read-only'* ]]; then if mount -u -w $_dkdev; then @@ -186,6 +180,12 @@ reorder_libs() { fi fi + # Only choose the latest version of the libraries. + for _liba in /usr/lib/lib{c,crypto}; do + _libas="$_libas $(ls $_liba.so.+([0-9.]).a | sort -V | tail -1)" + done + _libas=${_libas# } + for _liba in $_libas; do _tmpdir=$(mktemp -dq /tmp/_librebuild.XXXXXXXXXXXX) && ( set -o errexit