Remove the require_kld function I just committed and replace with a nicer solution.
Reported by: pjd Approved by: cperciva
This commit is contained in:
parent
01b19d7852
commit
0e5c8f9a0f
@ -84,7 +84,7 @@ init_variables()
|
||||
fi
|
||||
if [ "${_file}" != "${_file%.uzip}" ]; then
|
||||
# Load geom_uzip kernel module if needed
|
||||
require_kld geom_uzip
|
||||
kldstat -q -m g_uzip || kldload geom_uzip || err 1 "geom_uzip failed to load."
|
||||
_dev="/dev/${_md}.uzip"
|
||||
fi
|
||||
for _i in `df ${_file} 2>/dev/null`; do _fs=${_i}; done
|
||||
@ -103,7 +103,7 @@ mdconfig_start()
|
||||
{
|
||||
local _md _mp _config _type _dev _file _fs _newfs _fsck_cmd
|
||||
|
||||
require_kld g_md
|
||||
kldstat -q -m g_md || kldload geom_md || err 1 "geom_md failed to load."
|
||||
|
||||
for _md in ${_mdconfig_list}; do
|
||||
init_variables ${_md}
|
||||
|
@ -89,7 +89,7 @@ init_variables()
|
||||
|
||||
if [ "${_file}" != "${_file%.uzip}" ]; then
|
||||
# Load geom_uzip kernel module if needed
|
||||
require_kld geom_uzip
|
||||
kldstat -q -m g_uzip || kldload geom_uzip || err 1 "geom_uzip failed to load."
|
||||
_dev="/dev/${_md}.uzip"
|
||||
fi
|
||||
for _i in `df ${_file} 2>/dev/null`; do _fs=${_i}; done
|
||||
@ -111,7 +111,7 @@ mdconfig2_start()
|
||||
{
|
||||
local _md _fs _mp _mounted _dev _config _type _file _owner _perms _files _populate _fsck_cmd _i
|
||||
|
||||
require_kld g_md
|
||||
kldstat -q -m g_md || kldload geom_md || err 1 "geom_md failed to load."
|
||||
|
||||
for _md in ${_mdconfig2_list}; do
|
||||
init_variables ${_md}
|
||||
|
29
etc/rc.subr
29
etc/rc.subr
@ -1379,35 +1379,6 @@ ltr()
|
||||
echo "${_out}"
|
||||
}
|
||||
|
||||
# require_kld name
|
||||
# Ensure given module is loaded.
|
||||
# Try to load it if it's not.
|
||||
require_kld()
|
||||
{
|
||||
local _name _line _ret
|
||||
|
||||
_name=$1
|
||||
_me="require_kld"
|
||||
|
||||
_ret=`kldstat -v | while read _line; do
|
||||
case ${_line} in
|
||||
*" ${_name}")
|
||||
echo "yes"
|
||||
;;
|
||||
*)
|
||||
;;
|
||||
esac;
|
||||
done`
|
||||
|
||||
if [ -z "${_ret}" ]; then
|
||||
if kldload ${_name}; then
|
||||
info "${_name} module loaded."
|
||||
else
|
||||
err 1 "${_me}: ${_name} module failed to load."
|
||||
fi
|
||||
fi
|
||||
}
|
||||
|
||||
# Creates a list of providers for GELI encryption.
|
||||
geli_make_list()
|
||||
{
|
||||
|
Loading…
Reference in New Issue
Block a user