Update to use kldload, no temporary files!

This commit is contained in:
peter 1998-11-05 04:19:26 +00:00
parent 71b3e0fe14
commit a912408d9c
6 changed files with 24 additions and 38 deletions

View File

@ -24,7 +24,7 @@
# OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
# SUCH DAMAGE.
#
# $Id$
# $Id: ibcs2,v 1.7 1997/02/22 12:47:59 peter Exp $
PATH=/bin:/sbin:/usr/bin:/usr/sbin; export PATH
@ -35,18 +35,9 @@ fi
set -e
kernelfile=`sysctl -n kern.bootfile`
kernelfile=`basename $kernelfile`
newkernelfile="/tmp/_${kernelfile}+ibcs2$$"
trap 'rm -f $newkernelfile; exit 1' 1 2 3 13 15
rm -f $newkernelfile
modload -e ibcs2_mod -o $newkernelfile -q /lkm/ibcs2_mod.o
kldload ibcs2
for loader in $LOADERS; do
modload -e ibcs2_${loader}_mod -o/tmp/ibcs2_${loader} -q -u \
-A${newkernelfile} /lkm/ibcs2_${loader}_mod.o
kldload ibcs2_${loader}
done
rm -f ${newkernelfile}
set +e

View File

@ -24,7 +24,7 @@
# OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
# SUCH DAMAGE.
#
# $Id$
# $Id: ibcs2,v 1.7 1997/02/22 12:47:59 peter Exp $
PATH=/bin:/sbin:/usr/bin:/usr/sbin; export PATH
@ -35,18 +35,9 @@ fi
set -e
kernelfile=`sysctl -n kern.bootfile`
kernelfile=`basename $kernelfile`
newkernelfile="/tmp/_${kernelfile}+ibcs2$$"
trap 'rm -f $newkernelfile; exit 1' 1 2 3 13 15
rm -f $newkernelfile
modload -e ibcs2_mod -o $newkernelfile -q /lkm/ibcs2_mod.o
kldload ibcs2
for loader in $LOADERS; do
modload -e ibcs2_${loader}_mod -o/tmp/ibcs2_${loader} -q -u \
-A${newkernelfile} /lkm/ibcs2_${loader}_mod.o
kldload ibcs2_${loader}
done
rm -f ${newkernelfile}
set +e

View File

@ -1,4 +1,4 @@
#!/bin/sh
# $Id$
# $Id: joy,v 1.3 1997/02/22 12:48:17 peter Exp $
modload -q -u -A `sysctl -n kern.bootfile` /lkm/joy_mod.o
kldload joy

View File

@ -1,4 +1,4 @@
#!/bin/sh
# $Id$
# $Id: joy,v 1.3 1997/02/22 12:48:17 peter Exp $
modload -q -u -A `sysctl -n kern.bootfile` /lkm/joy_mod.o
kldload joy

View File

@ -1,10 +1,12 @@
#!/bin/sh
# $Id: linux,v 1.4 1997/02/22 12:48:25 peter Exp $
# $Id: linux,v 1.5 1998/09/07 16:15:59 cracauer Exp $
if modstat -n linux_mod > /dev/null ; then
echo Linux lkm already loaded
FOUND=`kldstat -v | egrep 'linux(aout|elf)'`
if [ "x$FOUND" != x ] ; then
echo Linux driver already loaded
exit 1
else
modload -e linux_mod -u -q -o /tmp/linux_mod /lkm/linux_mod.o
else
kldload linux
fi

View File

@ -1,10 +1,12 @@
#!/bin/sh
# $Id: linux,v 1.4 1997/02/22 12:48:25 peter Exp $
# $Id: linux,v 1.5 1998/09/07 16:15:59 cracauer Exp $
if modstat -n linux_mod > /dev/null ; then
echo Linux lkm already loaded
FOUND=`kldstat -v | egrep 'linux(aout|elf)'`
if [ "x$FOUND" != x ] ; then
echo Linux driver already loaded
exit 1
else
modload -e linux_mod -u -q -o /tmp/linux_mod /lkm/linux_mod.o
else
kldload linux
fi