Sync usage() with arp.8
[dragonfly.git] / etc / rc.d / kldxref
blobe1c5ef020fd55c3a63b14d23cd94098d36801ab0
1 #!/bin/sh
3 # $FreeBSD: src/etc/rc.d/kldxref,v 1.2 2003/04/18 17:55:05 mtm Exp $
4 # $DragonFly: src/etc/rc.d/Attic/kldxref,v 1.3 2005/11/19 21:47:32 swildner Exp $
7 # PROVIDE: kldxref
8 # REQUIRE: root mountcritlocal
9 # BEFORE: netif
11 . /etc/rc.subr
13 rcvar="kldxref_enable"
14 name="kldxref"
15 stop_cmd=":"
16 start_cmd="kldxref_start"
18 kldxref_start () {
19 if [ -n "$kldxref_module_path" ]; then
20 MODULE_PATHS="$kldxref_module_path"
21 else
22 MODULE_PATHS=`sysctl -n kern.module_path`
24 IFS=';'
25 for MODULE_DIR in $MODULE_PATHS; do
26 if [ ! -f "$MODULE_DIR/linker.hints" ] ||
27 checkyesno kldxref_clobber; then
28 echo "Building $MODULE_DIR/linker.hints"
29 kldxref "$MODULE_DIR"
31 done
34 load_rc_config $name
35 run_rc_command "$1"