diff options
author | Scott Soule Cheloha <cheloha@cvs.openbsd.org> | 2022-11-28 14:56:32 +0000 |
---|---|---|
committer | Scott Soule Cheloha <cheloha@cvs.openbsd.org> | 2022-11-28 14:56:32 +0000 |
commit | a7d9382a9e388c8507f7c5aa0b510ba193fe12ba (patch) | |
tree | 60bb6bc013e2d608f5ec691cb011af0aee0a3bbd /etc | |
parent | 8f33a75d610841713bbffda494ba0a4ba39c0f03 (diff) |
rc(8): reorder_libs: print names of relinked libraries
When booting from slow media, the boot can appear to stall at the
"reordering libs" line for quite some time. For my example, my G4
PowerMac booting from USB 1.1 takes a full minute to reorder the
libraries.
Let's print the name of each library before it is relinked. This
gives the operator a better sense of what the machine is doing. In
particular, it signals to the operator that the machine did not hang.
With input from kn@, deraadt@. Positive feedback from sthen@.
Link: https://marc.info/?l=openbsd-tech&m=165914104421476&w=2
ok kn@
Diffstat (limited to 'etc')
-rw-r--r-- | etc/rc | 10 |
1 files changed, 6 insertions, 4 deletions
@@ -1,4 +1,4 @@ -# $OpenBSD: rc,v 1.564 2022/08/29 11:51:05 deraadt Exp $ +# $OpenBSD: rc,v 1.565 2022/11/28 14:56:31 cheloha 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 @@ -193,7 +193,7 @@ reorder_libs() { # Remount the (read-only) filesystems in _ro_list as read-write. for _mp in $_ro_list; do if ! mount -u -w $_mp; then - echo ' failed.' + echo '(failed).' return fi done @@ -215,6 +215,7 @@ reorder_libs() { cd $_tmpdir ar x $_liba if [[ $_lib == ld.so ]]; then + echo -n " $_lib" args="-g -x -e _dl_start \ --version-script=Symbols.map --shared -Bsymbolic \ --no-undefined" @@ -225,6 +226,7 @@ reorder_libs() { $_install /usr/libexec/ld.so /usr/libexec/ld.so.save $_install ld.so.test $_lib_dir/ld.so else + echo -n " ${_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}' @@ -243,9 +245,9 @@ reorder_libs() { done if $_error; then - echo ' failed.' + echo '(failed).' else - echo ' done.' + echo '.' fi } |