On Tue, Nov 08, 2022 at 10:23:23AM +0000, Stuart Henderson wrote: > On 2022/11/07 23:54, Theo de Raadt wrote: > > Klemens Nanni <k...@openbsd.org> wrote: > > > > > > I know this makes rc(8) a bit noisier but it really does improve my > > > > (for want of a better term) "user experience" as I wait for my machine > > > > to boot. > > > > > > I like this and it doesn't add more **lines** to the boot log, but maybe > > > print library names without versions to reduces noise? > > > > Only if it is the short names. > > No need for the .so really either. ld.so libc libcrypto is enough. > > > But I am not sure people need to see this detail. It just takes a bit > > of time. How does knowing what steps are being taken help... > > Sometimes it's a bit of time, sometimes it's a _lot_ of time until > people get a new computer or raid battery or something and it's less > annoying if you can see _some_ progress.
Here's a simple diff that prints "ld.so" and "libc". Not trying to take over Scott's diff, just helping out on shell bits. Index: rc =================================================================== RCS file: /cvs/src/etc/rc,v retrieving revision 1.564 diff -u -p -r1.564 rc --- rc 29 Aug 2022 11:51:05 -0000 1.564 +++ rc 8 Nov 2022 10:32:32 -0000 @@ -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 }