Initial import from FreeBSD RELENG_4:
[dragonfly.git] / sys / emulation / linux / linux.sh
1 #!/bin/sh
2
3 # $FreeBSD: src/sys/modules/linux/linux.sh,v 1.8 1999/12/13 08:38:22 cracauer Exp $
4
5 FOUND=`kldstat -v | egrep 'linux(aout|elf)'`
6
7 exitcode=0
8
9 if [ "x$FOUND" != x ] ; then           
10         echo Linux driver already loaded
11         exitcode=1
12 else    
13         kldload linux                                                
14         exitcode=$?
15 fi
16
17 if [ -f /compat/linux/sbin/ldconfig ] ; then
18         /compat/linux/sbin/ldconfig
19 fi
20
21 exit $exitcode