[klibc] klibc insmod for recent kernels

Rusty Russell rusty@rustcorp.com.au
Sun, 05 Jan 2003 22:30:46 +1100


In message <3E168717.6090100@zytor.com> you write:
> Rusty Russell wrote:
> >>
> >>Not a good idea is probably a good way to sum it up, especially for 
> >>system().  Why on earth does module-init-tools need system()?  Requiring 
> >>a shell to install modules seems, ahem, daft?
> > 
> > No.  You can insert arbitary commands in the /etc/modprobe.conf (as
> > you could in /etc/modules.conf), which it executes in place of
> > inserting the module.
> 
> Sure, but why spawn /bin/sh to do it?  It seems doing it internally 
> would be both cleaner and faster.

Loading modules is hardly speed sensitive.  "install foo
/sbin/modprobe pre-foo && /sbin/modprobe foo" for example.  You may
want to do arbitrary things, and forcing you to write a shell script
isn't a really gread idea.

Cheers,
Rusty.
--
  Anyone who quotes me in their sig is an idiot. -- Rusty Russell.