Mailing List Archive

sript before modules (auto)loading
Hi,

I need to run some command before loading of some module, last is added to
modules.autoload.d/kernel-xxx.

You can say: "remove the module from the autolading and add your command with
appropriate modprobe to local.start". I'll answer: "Aha... But I'd want to be
sure the module is loaded _before_ some of the /etc/init.d/ scripts, but local.start
is the last script in init.d".

What is gentoo way to resolve the problem?

Andrew

--
gentoo-user@gentoo.org mailing list
Re: sript before modules (auto)loading [ In reply to ]
Andrew Gaydenko wrote:
> Hi,
>
> I need to run some command before loading of some module, last is added to
> modules.autoload.d/kernel-xxx.
>
> You can say: "remove the module from the autolading and add your command with
> appropriate modprobe to local.start". I'll answer: "Aha... But I'd want to be
> sure the module is loaded _before_ some of the /etc/init.d/ scripts, but local.start
> is the last script in init.d".
>
> What is gentoo way to resolve the problem?
>

I don't know if this is the "gentoo way":
1) hack the start function of the init script before which you want the
module loaded
2) create a init script that starts before the init script you want:

depend() {
before squid;
}

http://www.gentoo.org/doc/en/handbook/handbook-x86.xml?part=2&chap=5

--

Adi

--
gentoo-user@gentoo.org mailing list
Re: sript before modules (auto)loading [ In reply to ]
"gentoo way" - I mean, there are some config places "for emerging",
and some config places - "for user". For example, commonly /etc/init.d/*
is the first case, /etc/conf.d/* is the second one.

OK, I have added own script to /etc/init.d.

To clarify the question: is there some "for user" config place (which will
not be touched after updating some of software) where I can add script
calling _before_ loading of "autoloded" modules?

======= On Monday 20 September 2004 13:48, Adrian CAPDEFIER wrote: =======
Andrew Gaydenko wrote:
> Hi,
>
> I need to run some command before loading of some module, last is added to
> modules.autoload.d/kernel-xxx.
>
> You can say: "remove the module from the autolading and add your command with
> appropriate modprobe to local.start". I'll answer: "Aha... But I'd want to be
> sure the module is loaded _before_ some of the /etc/init.d/ scripts, but local.start
> is the last script in init.d".
>
> What is gentoo way to resolve the problem?
>

I don't know if this is the "gentoo way":
1) hack the start function of the init script before which you want the
module loaded
2) create a init script that starts before the init script you want:

depend() {
before squid;
}

http://www.gentoo.org/doc/en/handbook/handbook-x86.xml?part=2&chap=5

--

Adi

--
gentoo-user@gentoo.org mailing list



--
gentoo-user@gentoo.org mailing list
Re: sript before modules (auto)loading [ In reply to ]
Andrew Gaydenko wrote:
> "gentoo way" - I mean, there are some config places "for emerging",
> and some config places - "for user". For example, commonly /etc/init.d/*
> is the first case, /etc/conf.d/* is the second one.
>
> OK, I have added own script to /etc/init.d.
>
> To clarify the question: is there some "for user" config place (which will
> not be touched after updating some of software) where I can add script
> calling _before_ loading of "autoloded" modules?
>

I wasn't being sarcastic. Sorry if that is what that phrasing implied.
What I meant is that is how I would do it.


--

Adi

--
gentoo-user@gentoo.org mailing list
Re: sript before modules (auto)loading [ In reply to ]
Adrian,

I haven't found better way rather adding own script to
/etc/init.d/* too (and have done so).

BTW, I have not found any sarcasm, probably my english-reading
and englis-writing are very ugly :-)

Andrew


======= On Monday 20 September 2004 16:05, Adrian CAPDEFIER wrote: =======
Andrew Gaydenko wrote:
> "gentoo way" - I mean, there are some config places "for emerging",
> and some config places - "for user". For example, commonly /etc/init.d/*
> is the first case, /etc/conf.d/* is the second one.
>
> OK, I have added own script to /etc/init.d.
>
> To clarify the question: is there some "for user" config place (which will
> not be touched after updating some of software) where I can add script
> calling _before_ loading of "autoloded" modules?
>

I wasn't being sarcastic. Sorry if that is what that phrasing implied.
What I meant is that is how I would do it.


--

Adi

--
gentoo-user@gentoo.org mailing list



--
gentoo-user@gentoo.org mailing list