-# $OpenBSD: rc,v 1.565 2022/11/28 14:56:31 cheloha Exp $
+# $OpenBSD: rc,v 1.566 2022/12/26 18:57:50 florian 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
fi
done
- echo -n 'reordering libraries:'
+ echo 'reordering libraries:'
# Remount the (read-only) filesystems in _ro_list as read-write.
for _mp in $_ro_list; do
cd $_tmpdir
ar x $_liba
if [[ $_lib == ld.so ]]; then
- echo -n " $_lib"
+ echo " $_lib"
args="-g -x -e _dl_start \
--version-script=Symbols.map --shared -Bsymbolic \
--no-undefined"
$_install /usr/libexec/ld.so /usr/libexec/ld.so.save
$_install ld.so.test $_lib_dir/ld.so
else
- echo -n " ${_lib%%.*}"
+ echo " ${_lib%%.*}"
cc -shared -o $_lib $(ls *.so | sort -R) $(<.ldadd)
[[ -s $_lib ]] && file $_lib | fgrep -q 'shared object'
LD_BIND_NOW=1 LD_LIBRARY_PATH=$_tmpdir awk 'BEGIN {exit 0}'
fi
}
+# Read output of reorder_libs co-process and output on console.
+wait_reorder_libs() {
+ local _line
+ while IFS= read -p _line; do
+ echo -n "$_line"
+ done
+ echo
+}
+
# Run rc.* script and email output to root.
# Usage: run_upgrade_script firsttime|sysmerge
run_upgrade_script() {
mount -s /var/log >/dev/null 2>&1 # cannot be on NFS
mount -s /usr >/dev/null 2>&1 # if NFS, fstab must use IP address
+reorder_libs 2>&1 |&
+
start_daemon slaacd dhcpleased resolvd >/dev/null 2>&1
echo 'starting network'
random_seed
-reorder_libs
+wait_reorder_libs
# Load pf rules and bring up pfsync interface.
if [[ $pf != NO ]]; then