On Wednesday 20 February 2008 09:25:46 am Matt Domsch wrote:
On Wed, Feb 20, 2008 at 04:20:33PM +0200, Eugene Goubine wrote:
> Where can I get an information about the order in which the modules
> are unloaded
> when the system shuts down.I am writing a module which is going to be
> sort of networking protocol
> so the unloading order is crucial for me.
In general, kernel modules are not unloaded at system shutdown.
If they are unloaded, that's done so by the initscripts of various
programs. A quick grep 'modprobe -r' /etc/init.d/* shows that
cpuspeed, ip6tables, ip6tables, and lm_sensors initscripts (on my
system) unload kernel modules.
Nb: in the cpuspeed case, the module unloads aren't on shutdown either.
They're done when we try loading a cpufreq driver that we think will work on
the system, but it doesn't find supported hardware. Rather than leaving a
useless module loaded, we do some clean-up in this case.
--
Jarod Wilson
jwilson(a)redhat.com