Simplify the code a bit by using newly added (to kldstat(8) '-q') option.

This commit is contained in:
Pawel Jakub Dawidek 2005-09-23 23:53:35 +00:00
parent 90217cddd0
commit bb13d7dc5e
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=150498

View File

@ -46,10 +46,7 @@ geli_start()
return
fi
geli load >/dev/null 2>&1
if ! kldstat -m g_eli >/dev/null 2>&1; then
err 1 'geom_eli module failed to load.'
fi
kldstat -q -m g_eli || geli load || err 1 'geom_eli module failed to load.'
if [ -z "${geli_tries}" ]; then
if [ -n "${geli_attach_attempts}" ]; then