Changeset View
Changeset View
Standalone View
Standalone View
libexec/rc/rc.d/devmatch
Show First 20 Lines • Show All 58 Lines • ▼ Show 20 Lines | devmatch_start() | ||||||||
# all items in the devmatch_blocklist. | # all items in the devmatch_blocklist. | ||||||||
# | # | ||||||||
# We strip all the .ko suffixes off so that one may specify modules | # We strip all the .ko suffixes off so that one may specify modules | ||||||||
# with or without .ko. Prior version documented it was without, while | # with or without .ko. Prior version documented it was without, while | ||||||||
# the code required it, so accept both now. devmatch produces module | # the code required it, so accept both now. devmatch produces module | ||||||||
# names with .ko | # names with .ko | ||||||||
devctl freeze | devctl freeze | ||||||||
x=$(echo '#'${devmatch_blocklist:-${devmatch_blacklist}}'#' | \ | x=$(echo "#${devmatch_blocklist:-${devmatch_blacklist}}#$(kenv -q devmatch_blocklist)#" | \ | ||||||||
kevans: I think... | |||||||||
Not Done Inline Actions
Why don't we use " here? 0mp: Why don't we use `"` here? | |||||||||
Done Inline ActionsToo many years of paranoia... That would work. imp: Too many years of paranoia... That would work. | |||||||||
sed -e "s/ /#/g;s/\.ko#/#/g") | sed -e "s/ /#/g;s/\.ko#/#/g") | ||||||||
for m in ${list}; do | for m in ${list}; do | ||||||||
m="${m%.ko}" | m="${m%.ko}" | ||||||||
case "${x}" in | case "${x}" in | ||||||||
*"#${m}#"*) continue ;; | *"#${m}#"*) continue ;; | ||||||||
esac | esac | ||||||||
kldstat -q -n ${m} || \ | kldstat -q -n ${m} || \ | ||||||||
(echo "Autoloading module: ${m}"; kldload -n ${m}) | (echo "Autoloading module: ${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" |
I think...