rc.d - Use kldstat -m to test existance before kldload
commit61fb4aca35dab137e1fcb5b5f35363a6c6fb79b4
authorMatthew Dillon <dillon@apollo.backplane.com>
Tue, 31 Jan 2017 02:25:17 +0000 (30 18:25 -0800)
committerMatthew Dillon <dillon@apollo.backplane.com>
Tue, 31 Jan 2017 02:25:17 +0000 (30 18:25 -0800)
tree50af6feea3857be711e73afd07bffddb36727d9c
parentc50e690bc7b0d735c80bd022c73ba8ec2eeadda0
rc.d - Use kldstat -m to test existance before kldload

* Use kldstat -m module || kldload -n module || exit 1  (roughly) when
  testing modules in rc scripts.

* Fixes issue where kernels boot up in secure mode (aka vkernels do this
  by default) and rc scripts fail because kldload exits immediately with
  an error, even if the module already exists.
etc/rc.d/abi
etc/rc.d/addswap
etc/rc.d/ip6fw
etc/rc.d/ipfw
etc/rc.d/mountcritremote
etc/rc.d/nfsclient
etc/rc.d/nfsserver
etc/rc.d/pf
etc/rc.d/pflog
etc/rc.d/syscons
etc/rc.d/vknetd