From mboxrd@z Thu Jan 1 00:00:00 1970 From: DervishD Date: Tue, 27 Feb 2007 17:23:20 +0000 Subject: Loading modules on demand with /sbin/hotplug Message-Id: <20070227172320.GA10176@DervishD> List-Id: MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable To: linux-hotplug@vger.kernel.org Hi all :)) First of all, if this is not the proper forum, please ignore my message and point me to the proper place/information source, please ;) Well, I'm setting up hotplugging by hand on a do-it-yourself Linux box, and until now everything has worked ok: udev is up and running, and succesfully creates/removes dev entries, the dynamic /dev is usable too with a 2.4 kernel by some booting tricks and udevd runs fast. My next step is to automatically create mount points and load needed modules as soon as some devices are plugged into the system. Here is where I need some advice, because none of my approaches have worked 100%. Since I would like to avoid things like HAL and the like, my first try was to use the "RUN" key, containing a script that creates mount points and loads modules. The script, run by hand, works like a charm. Unfortunately, I was having problems getting the remove events, since I was filtering by "ATTRS{serial}" and at removing time, the parent device (which contained that information) was removed before the "final" device (that is, the one that caused the /dev entry using "NAME"). Trying to find a correct combination of keys to filter seemed difficult and so I tried a different approach. This time I put my script as /sbin/hotplug instead of having it in a "RUN" key. Here my problem is that I cannot get the information properly in my script. Well, long story short: assuming that I have udev up and running, and a script capable of creating mount points and load modules (right now, using a config file, in the future I may use MODALIAS or something like that, if I'm able to get a grip on it), how the heck should I write rules/set up things so my script is called and able to perform its duty? Thanks a lot, and sorry if this question has been answered before, I've took a look at the FAQ and I didn't find anything useful, and a couple of search of the mailing list archives didn't give any info, either. Ra=FAl N=FA=F1ez de Arenas Coronado --=20 Linux Registered User 88736 | http://www.dervishd.net It's my PC and I'll cry if I want to... RAmen! ------------------------------------------------------------------------- Take Surveys. Earn Cash. Influence the Future of IT Join SourceForge.net's Techsay panel and you'll get the chance to share your opinions on IT & business topics through brief surveys-and earn cash http://www.techsay.com/default.php?page=3Djoin.php&p=3Dsourceforge&CID=DEVD= EV _______________________________________________ Linux-hotplug-devel mailing list http://linux-hotplug.sourceforge.net Linux-hotplug-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/linux-hotplug-devel