Re: modprobe.conf is ignored

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

 



Todd Zullinger wrote:
>> So maybe I have to write my own service or I modify the modprobe
>> entry such that a script is started in the background that waits for
>> the filesystem to be mounted read-write and then starts the daemon.
> 
> You could use this simple init script as a basis for an ipw3945d
> service:
> 
> http://svn.rpmforge.net/svn/trunk/rpms/ipw3945d/ipw3945d.init

Thanks for that but I don't want to add a new service for that. This is
because I think the daemon should always be started and stopped together
with the kernel module.

So I found the following solution. It is quite ugly but works well and
only requires to add a new file. Create a new file
/etc/modprobe.d/ipw3945.conf with the following content:

alias eth1 ipw3945

install ipw3945 /sbin/modprobe --ignore-install ipw3945 && \
{ \
while [ -e /var/run/ipw3945d.pid ]; do \
rm /var/run/ipw3945d.pid; \
sleep 1; \
done; \
until [ -e /var/run/ipw3945d.pid ]; do \
/sbin/ipw3945d --quiet; \
sleep 1; \
done; \
} &

remove ipw3945 /sbin/ipw3945d --kill; \
/sbin/modprobe -r --ignore-remove ipw3945


The simple idea behind this to start a background process when the
module gets loaded and repeatedly try to start the daemon until this
succeeds.

Joachim


[Index of Archives]     [Current Fedora Users]     [Fedora Desktop]     [Fedora SELinux]     [Yosemite News]     [Yosemite Photos]     [KDE Users]     [Fedora Tools]     [Fedora Docs]

  Powered by Linux