OESF Portables Forum

General Forums => General Discussion => Topic started by: the_oak on November 02, 2005, 11:49:01 am

Title: How To Autoload Modules?
Post by: the_oak on November 02, 2005, 11:49:01 am
If I want to get a module to automatically load each time I boot the zaurus, what file do I add "modprobe serial_cs" to?
Title: How To Autoload Modules?
Post by: lardman on November 02, 2005, 12:42:51 pm
Decide which run-level you want and add a script to /etc/rc?.d/


Si
Title: How To Autoload Modules?
Post by: the_oak on November 02, 2005, 03:08:32 pm
lardman, Thanks!!

I wrote a script (seems wrong to call a two-liner a script) as follows:
Code: [Select]
#!/bin/bash
insmod serial_cs

I saved it at /etc/rc.d/rc5.d naming the file S49serial_cs
I believe the scripts in this directory are only executed if they begin with an "S" and some number. I presume that the number determines the order in which the scripts are executed, so I gave it a number higher than the rest. (After all it has been previously loaded after the zaurus boots completely.) Also don't forget to make the owner and group of the file root and make it executable, with these commands:

chown root /etc/rc.d/rc5.d/S49serial_cs
chgrp root /etc/rc.d/rc5.d/S49serial_cs
chmod 755 /etc/rc.d/rc5.d/S49serial_cs

Or easier yet, use TreeExplorer File>Properties>Security to change all that stuff.
Title: How To Autoload Modules?
Post by: Hrw on November 03, 2005, 04:59:06 am
Adding module name into /etc/modules should work in any normal Linux distro.
Title: How To Autoload Modules?
Post by: the_oak on November 03, 2005, 08:23:45 am
Quote
Adding module name into /etc/modules should work in any normal Linux distro.
[div align=\"right\"][a href=\"index.php?act=findpost&pid=102027\"][{POST_SNAPBACK}][/a][/div]

That is what I had been looking for, and would certainly be less convoluted, but the default Sharp rom did not have a /etc/modules directory. I tried creating one, and that did not work. Possibly something that I did wrong? Or maybe some other script has to be edited to point to /etc/modules?

Thanks anyway!