Autoloading of Modules, the Debian way.

arthur at linuxbox.nu arthur at linuxbox.nu
Wed Mar 7 21:04:49 PST 2001


My hard drive is in a caddy and gets plugged into all kinds of different
machines.  To compile all the modules in that I need for whatever machine
I might encounter would be inefficient.

Arthur H. Johnson II
Systems Engineer
The Linux Box
arthur at linuxbox.nu
http://www.linuxbox.nu

On Thu, 8 Mar 2001, Brett wrote:

>
> Why would you do such a thing ?
>
> It really puzzles me as to why people bother modularising things that they
> plan to load at boot.  Why not just build it in.  Modules are best suited
> for things which are only used occasionally... like iso9660 fs support, or
> perhaps smbfs.
>
> Do you have a real reason for doing this ?
>
> 	/ Brett
>
> On Wed, 7 Mar 2001 arthur at linuxbox.nu wrote:
> >
> >
> > Debian has a file called /etc/modules.  I borrowed from their code to make
> > a quick and dirty hack of autoloading of modules at boot without kerneld
> > or kmod.  This works for me:
> >
> > (cat modules; echo) | # make sure there is a LF at the end
> > while read /etc/module args
> > do
> >         case "$module" in
> >                 \#*|"") continue ;;
> >         esac
> >         modprobe $module $args
> > done
> >
> > The case is for stripping comments.  I am calling it /etc/init.d/modprobe.
> > ALl modules to load at boot are in /etc/modules
> >
> > Arthur H. Johnson II
> > Systems Engineer
> > The Linux Box
> > arthur at linuxbox.nu
> > http://www.linuxbox.nu
> >
> >
> >
>
>
> --
> Unsubscribe: send email to lfs-discuss-request at linuxfromscratch.org
> and put unsubscribe in the subject header of the message
>


-- 
Unsubscribe: send email to lfs-discuss-request at linuxfromscratch.org
and put unsubscribe in the subject header of the message




More information about the lfs-dev mailing list