Is your feature request related to a problem? Please describe.
Some folk like to load kernel modules using /etc/rc.conf's kld_list rather than putting them in /boot/loader.conf, this way we can always boot to single user mode to recover from a module gone wrong.
Describe the solution you'd like
To this end, the check you've added to bootstrap.sh could perhaps validate that the modules are loaded rather than that they have been requested from loader.conf. In my little world I would consider something akin to:
isloaded() {
# The double test is because with FreeBSD 13 tmpfs is built into the
# default kernel thus doesn't show as a distinct module in kldstat's
# output
if [ $(kldstat | grep -q $1) -o $(nm /boot/kernel/kernel | grep -q $1) ]; then
return 0
fi
return 1
}
...
isloaded linprocfs.ko && isloaded linsysfs.ko && isloaded tmpfs.ko || {
echo "should I fix that for you?"
read answer
...
}
Is your feature request related to a problem? Please describe. Some folk like to load kernel modules using
/etc/rc.conf
'skld_list
rather than putting them in/boot/loader.conf
, this way we can always boot to single user mode to recover from a module gone wrong.Describe the solution you'd like To this end, the check you've added to
bootstrap.sh
could perhaps validate that the modules are loaded rather than that they have been requested fromloader.conf
. In my little world I would consider something akin to: