@ -1,4 +1,4 @@
# $OpenBSD: rc,v 1.532 2019/01/26 10:59:07 floria n Exp $
# $OpenBSD: rc,v 1.533 2019/02/19 20:41:52 k n Exp $
# System startup script run by init on autoboot or after single-user.
# 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
# Output and error are redirected to console by init, and the console is the
@ -175,13 +175,11 @@ reorder_libs() {
# Skip if /usr/lib, /usr/libexec or /usr/share/relink are on nfs mounted
# Skip if /usr/lib, /usr/libexec or /usr/share/relink are on nfs mounted
# filesystems, otherwise record which ones are mounted read-only.
# filesystems, otherwise record which ones are mounted read-only.
for _d in /usr/{lib,libexec,share/relink}; do
_dkdev=$(df $_d | sed '1d;s/ .*//')
_mp=$(mount | grep "^$_dkdev")
[[ $_mp == *" type nfs "* ]] && return
if [[ $_mp == *" type ffs "*"read-only"* &&
$_ro_list != *${_mp%% *}* ]]; then
_ro_list="$_ro_list ${_mp%% *}"
for _dkdev in $(df /usr/{lib,libexec} $_relink |
sed '1d;s/ .*//' | sort -u); do
_mp=$(mount -t ffs | grep "^$_dkdev") || return
if [[ $_mp == *read-only* ]]; then
_ro_list="$_ro_list ${_mp%% *}"
fi
fi
done
done