startup filesForum: Other Help Topics Topic: startup files started by: caulktel Posted by caulktel on Dec. 06 2003,04:33
Hi, Does anybody know where in DSL you would stick a command that you want to execute on bootup? I need to issue a modprobe command to load my sound card module at bootup. Any help would be great. Joel Posted by roberts on Dec. 06 2003,18:43
I would wait till 0.5.1 as it has .bash_profile which is very easy to add commands for both LiveCD via restore and HD users. Otherwise you will have to hack around in some system files.
Posted by caulktel on Dec. 10 2003,16:25
Well, I just installed 5.1 on my laptop and inserted the rather long modprobe command in the .bash_profile, but it still wont load it on bootup. I tried putting it before the other two commands and after them, still won't load it. Why is there no rc.local files, that always worked on other distrobutions. I still love DSL though.
Posted by skaos on Dec. 10 2003,17:20
Take a look at the files in /etc/rc.d and find which file that's used for loading modules (or maybe it is in /etc/rc.d/init, I'm not quite sure).
Posted by roberts on Dec. 10 2003,20:34
Need more information on where you put the commands and what type of system. If a LiveCD did you save and then restore at boot. Did you use Damnsmall's .bash_profile, did you add sudo before the modprobe ...? If the modprobe works at a shell, it should work in the .bash_profile.
Posted by caulktel on Dec. 10 2003,22:27
I'm using a hard drive install, and i did not put the sudo command before it, but that would make sense as it would need to be done as root. I will give that a try, thanks for your help. Joel
Posted by caulktel on Dec. 11 2003,02:00
After inserting sudo command it still does not work. Here is the exact line that I added to the .bash_profile :sudo modprobe opl3sa2 io=0x370 mss_io=0x530 mpu_io=0x330 irq=5 dma=1 dma2=0. If I issue this command from the console, it works perfectly, but not from the .bash_profile on bootup. I'm still baffeled about this, any ideas? Joel Posted by jogi on Dec. 11 2003,09:22
Try this,open a console. zile /usr/sbin/opl3sa2.sh #! /bin/sh modprobe opl3sa2 io=0x370 mss_io=0x530 mpu_io=0x330 irq=5 dma=1 dma2=0 Save this file with ctrl + x/ +c / y chmod 755 /usr/sbin/opl3sa2.sh ln /usr/sbin/opl3sa2.sh /etc/rc3.d/S22opl3sa2 (to start in init 3) ln /usr/sbin/opl3sa2.sh /usr/rc5.d/S22opl3sa2 (to start in init 5) Jogi Posted by caulktel on Dec. 11 2003,20:32
Jogi,Thank You, that worked very well, except in the last link line I think you meant for the line to read /etc/rc5.d not /usr/rc5.d, but other than that everything worked out good. I even understand what you did, I was trying to do the same thing, but was not familar with Debian or DSL enough to do it. Thanks! Posted by roberts on Dec. 12 2003,01:50
Say Caulktel, I am glad that you have a solultion. And Jogi's answer is fine if you are hard drive installed. But it doesn't help if you are running a liveCD. I am inserting three modules via .bash_profile and it works both liveCD and hard drive. The answer I was trying to give is to be of benefit to both groups of users.
Posted by caulktel on Dec. 12 2003,03:34
Roberts,Thank you for your post, I was able to use the .bash_profile for some other startup commands, it just would not work for this. It was, however a learning experience, which is what it is all about. I learned alot about scripting. Thanks again. Joel Posted by jogi on Dec. 13 2003,01:33
caulktel,yes , i meant /etc/rc5.d. DSL is a very fine System! It runs on an old 466Celerion with a 128MB Flashcard hard drive install. Only to play Music over Network. A great Jukebox with over 6000 Oggvorbis-Files.... I love it! Jogi |