Koozali.org: home of the SME Server
Obsolete Releases => SME Server 7.x => Topic started by: levien on April 18, 2007, 01:36:40 PM
-
Hello everyone,
I posted this question to the contribs forum, but didn't get any reply, so I'll try here instead. :)
What would be the best way to load kernel modules and do other custom boot-time stuff in SME 7.x? In the past (SME 5.6) I manually added things to the /etc/rc.d/rc.local script. Is it wise to keep doing this, or would it be better to put such things into a template fragment for one of the other init scripts (and if so, which one)?
I basically need to start a small non-standard script which sets up our DSL connection, and I also need to insert a few kernel modules that are not loaded automagically (the padlock and via_rng modules for hardware encryption support on VIA C7 processors).
Thanks!
Levien
-
What would be the best way to load kernel modules and do other custom boot-time stuff in SME 7.x? In the past (SME 5.6) I manually added things to the /etc/rc.d/rc.local script.
You would have lost your customisations any time that /etc/rc.d/rc.local was updated.
What you should do is add one or more scripts named Snnxxxx into the /etc/e-smith/events/local directory.
What is special about your DSL modem that it needs different initialisation?
-
You would have lost your customisations any time that /etc/rc.d/rc.local was updated.
Apparently I have been lucky so far, as that has never happened. But I thought as much...
What you should do is add one or more scripts named Snnxxxx into the /etc/e-smith/events/local directory.
OK, I will try that. Thanks for the advice!
What is special about your DSL modem that it needs different initialisation?
It's old. :-) I have to set up a PPTP connection to the modem, which is then used as the external interface. I use the ancient adsl4linux package for that. I know I should probably get another modem one of these days, buf for now this works just fine...
Thanks!
Levien
-
What you should do is add one or more scripts named Snnxxxx into the /etc/e-smith/events/local directory.
Hmm, I tried that, but it doesn't seem to work.
I mimicked the other scripts in this dir, so my script is called /etc/e-smith/events/actions/custom-setup-via and looks like this:
#!/bin/sh
# Custom initialisation stuff for the VIA C7
exec /sbin/modprobe via_rng
exec /sbin/modprobe padlock
exec echo ondemand >/sys/devices/system/cpu/cpu0/cpufreq/scaling_governor
I then created a symlink to the above at /etc/e-smith/events/local/S60custom-setup-via. I tried both a reboot and signalling a "local" event, but the script never seems to be executed. What am I doing wrong?
Best regards,
Levien
-
What you should do is add one or more scripts named Snnxxxx into the /etc/e-smith/events/local directory.
Hmm, I tried that, but it doesn't seem to work.
I mimicked the other scripts in this dir, so my script is called /etc/e-smith/events/actions/custom-setup-via and looks like this:
#!/bin/sh
# Custom initialisation stuff for the VIA C7
exec /sbin/modprobe via_rng
exec /sbin/modprobe padlock
exec echo ondemand >/sys/devices/system/cpu/cpu0/cpufreq/scaling_governor
I then created a symlink to the above at /etc/e-smith/events/local/S60custom-setup-via. I tried both a reboot and signalling a "local" event, but the script never seems to be executed. What am I doing wrong?
'exec' never returns. So you ran modprobe via_rng, but not the rest of your script.
-
'exec' never returns. So you ran modprobe via_rng, but not the rest of your script.
Oops, you can tell I'm not a very experience shell script programmer... :)
It now works as expected, thanks!
-L.