diff options
Diffstat (limited to 'etc')
-rw-r--r-- | etc/rc.d/mdconfig | 5 | ||||
-rw-r--r-- | etc/rc.d/mdconfig2 | 5 |
2 files changed, 10 insertions, 0 deletions
diff --git a/etc/rc.d/mdconfig b/etc/rc.d/mdconfig index b02990f..5a7fad6 100644 --- a/etc/rc.d/mdconfig +++ b/etc/rc.d/mdconfig @@ -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 diff --git a/etc/rc.d/mdconfig2 b/etc/rc.d/mdconfig2 index 09ef160..7178765 100644 --- a/etc/rc.d/mdconfig2 +++ b/etc/rc.d/mdconfig2 @@ -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 |