Don't load geom_md.ko if there is no need to.
This commit is contained in:
parent
60b057864d
commit
8b60fade6c
@ -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
|
||||
|
@ -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
|
||||
|
Loading…
x
Reference in New Issue
Block a user