Re: Detecting kmod

Erik Andersen (andersee@debian.org)
Fri, 20 Mar 1998 23:23:14 -0700


On Fri, Mar 20, 1998 at 10:49:27PM -0500, Anthony DeStefano wrote:
> I have began using kmod with 2.1.90 now and I was wondering how many of
> you where detecting weather to make the appropriate echo's or start kerneld
> when booting multiple kernels (which I sometimes do to test things)
>
> I now have if [ `uname -r` = '2.1.90' ]; then in my startup script but as
> you can see that's going to get really annoying after kernel 2.1.90.
>
> So what do you people do? Is there a file I could check for in /proc or
> something?
>
> -= Anthony DeStefano =-
> <destefano@usa.net>
>
>

The Debian modutils package does this in /etc/init.d/kerneld:

if [ -f /proc/sys/kernel/modprobe ]; then
echo "Kernel has kmod, kerneld not needed"
exit 0
fi

-Erik

--
Erik B. Andersen   Web:    http://www.inconnect.com/~andersen/ 
                   email:  andersee@debian.org
--This message was written using 73% post-consumer electrons--

- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.rutgers.edu