Re: depends command

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On 6/1/09, Kay Sievers <kay.sievers@xxxxxxxx> wrote:
> On Mon, Jun 1, 2009 at 00:15, Andreas Robinson <andr345@xxxxxxxxx> wrote:
>> depends _modulename_ _dependency1_ _dependency2_ ...
>>
>> This command allows you to add one or more additional dependencies to a
>> module. *modprobe* will attempt to insert them in order, from left to
>> right, before dealing with _modulename_. If any dependency fails to
>> install, *modprobe* will stop, unless it was already in the kernel or
>> blacklisted.
>
> I guess we should not fail, like in case the module is not compiled
> for the current kernel, all should work just fine. In many cases
> "depends" will be used to make sure that the module listed as a
> dependency will work correctly, and not that the loaded module would
> fail if the dependency is not resolved.
>
>> *modprobe* treats each module as if it had been specified on the command
>> line. Thus, _modulename_ and any of the dependency names can be aliases
>> and the dependencies can have their own *depends* commands. *modprobe*
>> will stop if it finds a circular dependency.
>
> Sounds good.
>
>> ------
>>
>> Comments are very much welcomed. If you know of any useful synonyms for
>> "dependency" that'd be neat too. It's not that this text is meant to be
>> poetry, but some variety would be nice. :)
>
> Hmm, since we don't really "depend" on another module in most cases,
> we might want something like "softdepend", prerequire", "preload"?.
>
> Thanks,
> Kay

pre- something sounds like a good idea.  Because I think we want
post-<something> as well.

$ cat /etc/modprobe.d/oss-compat
install snd-pcm modprobe --ignore-install snd-pcm $CMDLINE_OPTS && {
modprobe --quiet snd-pcm-oss ; : ; }
...

I don't know if this specific config is sane, but I think it makes
sense in general.  snd-pcm-oss is optional, but the idea is that users
may be surprised if it is not loaded.  It has to be loaded _after_
snd-pcm, because it depends on it.

Alan
--
To unsubscribe from this list: send the line "unsubscribe linux-modules" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[Index of Archives]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]     [Big List of Linux Books]

  Powered by Linux