Don't load geom_md.ko if there is no need to.

This commit is contained in:
pjd 2006-07-25 17:19:00 +00:00
parent 60b057864d
commit 8b60fade6c
2 changed files with 10 additions and 0 deletions

View File

@ -103,6 +103,11 @@ mdconfig_start()
{
local _md _mp _config _type _dev _file _fs _newfs _fsck_cmd
# If there are no devices return before loading geom_md.ko.
if [ -z "${_mdconfig_list}" ]; then
return
fi
kldstat -q -m g_md || kldload geom_md || err 1 "geom_md failed to load."
for _md in ${_mdconfig_list}; do

View File

@ -111,6 +111,11 @@ mdconfig2_start()
{
local _md _fs _mp _mounted _dev _config _type _file _owner _perms _files _populate _fsck_cmd _i
# If there are no devices return before loading geom_md.ko.
if [ -z "${_mdconfig2_list}" ]; then
return
fi
kldstat -q -m g_md || kldload geom_md || err 1 "geom_md failed to load."
for _md in ${_mdconfig2_list}; do