Changeset View
Changeset View
Standalone View
Standalone View
libexec/rc/rc.d/devmatch
Show First 20 Lines • Show All 53 Lines • ▼ Show 20 Lines | devmatch_start() | ||||
# While kldload can accept multiple modules | # While kldload can accept multiple modules | ||||
# on the line at once, we loop here in case | # on the line at once, we loop here in case | ||||
# there's some weird error with one of them. | # there's some weird error with one of them. | ||||
# We also optimize against the false positives | # We also optimize against the false positives | ||||
# or drivers that have symbolic links that | # or drivers that have symbolic links that | ||||
# confuse devmatch by running it -n. | # confuse devmatch by running it -n. | ||||
# Finally, we filter out all items in the | # Finally, we filter out all items in the | ||||
# devmactch_blacklist. | # devmatch_blocklist. | ||||
devctl freeze | devctl freeze | ||||
x=$(echo ${devmatch_blacklist} | tr ' ' '#') | x=$(echo ${devmatch_blocklist:-${devmatch_blacklist}} | tr ' ' '#') | ||||
for m in ${list}; do | for m in ${list}; do | ||||
case "#${x}#" in | case "#${x}#" in | ||||
*"#${m}#"*) continue ;; | *"#${m}#"*) continue ;; | ||||
esac | esac | ||||
echo "Autoloading module: ${m}" | echo "Autoloading module: ${m}" | ||||
kldload -n ${m} | kldload -n ${m} | ||||
done | done | ||||
devctl thaw | devctl thaw | ||||
} | } | ||||
load_rc_config $name | load_rc_config $name | ||||
run_rc_command "$1" | run_rc_command "$1" |