#!/bin/sh
#RC:RUNINRC
#RC:AFTER remotefs
#RC:BEFORE daemons

# Make shared lib searching a little faster.  Leave /usr/lib first if you
# add your own entries or you may come to grief.
if [ -x /sbin/ldconfig ]; then
	if [ X"`/usr/bin/objformat`" = X"elf" ]; then
		_LDC=/usr/lib
		for i in $ldconfig_paths; do
			if test -d $i; then
				_LDC="${_LDC} $i"
			fi
		done
		echo 'setting ELF ldconfig path:' ${_LDC}
		ldconfig -elf ${_LDC}
	fi

	# Default the a.out ldconfig path, in case the system's
	# /etc/rc.conf hasn't been updated.
	: ${ldconfig_paths_aout=${ldconfig_paths}}
	_LDC=/usr/lib/aout
	for i in $ldconfig_paths_aout; do
		if test -d $i; then
			_LDC="${_LDC} $i"
		fi
	done
	echo 'setting a.out ldconfig path:' ${_LDC}
	ldconfig -aout ${_LDC}
fi

