Make /etc/rc.d/kldxref not print anything for directories that don't

contain any kernel modules.  This makes the common case completely silent,
as it should be.

Reviewed by:	imp@
MFC after:	2 weeks
Sponsored by:	DARPA, AFRL
Differential Revision:	https://reviews.freebsd.org/D14694
This commit is contained in:
Edward Tomasz Napierala 2018-05-11 14:43:21 +00:00
parent 47dd1d1b61
commit 2b55bea538

View File

@ -24,8 +24,9 @@ kldxref_start() {
fi
IFS=';'
for MODULE_DIR in $MODULE_PATHS; do
if [ ! -f "$MODULE_DIR/linker.hints" ] ||
checkyesno kldxref_clobber; then
if checkyesno kldxref_clobber ||
[ ! -f "$MODULE_DIR/linker.hints" ] &&
[ `echo ${MODULE_DIR}/*.ko` != "${MODULE_DIR}/*.ko" ]; then
echo "Building $MODULE_DIR/linker.hints"
kldxref "$MODULE_DIR"
fi