1#!/bin/sh 2# 3# $FreeBSD: releng/11.0/etc/rc.d/kldxref 298514 2016-04-23 16:10:54Z lme $ 4# 5 6# PROVIDE: kldxref 7# REQUIRE: FILESYSTEMS 8# BEFORE: netif 9# KEYWORD: nojail 10 11. /etc/rc.subr 12 13rcvar="kldxref_enable" 14name="kldxref" 15desc="Generate hints for the kernel loader" 16stop_cmd=":" 17start_cmd="kldxref_start" 18 19kldxref_start() { 20 if [ -n "$kldxref_module_path" ]; then 21 MODULE_PATHS="$kldxref_module_path" 22 else 23 MODULE_PATHS=`sysctl -n kern.module_path` 24 fi 25 IFS=';' 26 for MODULE_DIR in $MODULE_PATHS; do 27 if [ ! -f "$MODULE_DIR/linker.hints" ] || 28 checkyesno kldxref_clobber; then 29 echo "Building $MODULE_DIR/linker.hints" 30 kldxref "$MODULE_DIR" 31 fi 32 done 33} 34 35load_rc_config $name 36run_rc_command "$1" 37