NetBSD/etc/rc.lkm

62 lines
787 B
Plaintext

# $NetBSD: rc.lkm,v 1.1 1997/01/05 11:47:53 mrg Exp $
#
# this script loads any LKM's that are required.
[ -s /etc/lkm.conf ] && (
while read path options entry postinstall output; do
cmd='modload '
case $path in
\#*|"")
continue
;;
/*)
;;
*)
if [ -f "/lkm/$path" ]; then
path="/lkm/$path"
elif [ -f "/usr/lkm/$path" ]; then
path="/usr/lkm/$path"
else
echo "couldn't find module $path";
fi
;;
esac
case $options in
-)
;;
*)
cmd="$cmd $options"
;;
esac
case $entry in
-)
;;
*)
cmd="$cmd -e $entry"
;;
esac
case $postinstall in
-)
;;
*)
cmd="$cmd -p $postinstall"
;;
esac
case $output in
-)
;;
*)
cmd="$cmd -o $output"
;;
esac
$cmd $path
done
) < /etc/lkm.conf