LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Slackware - Installation (https://www.linuxquestions.org/questions/slackware-installation-40/)
-   -   Script won't run at boot (https://www.linuxquestions.org/questions/slackware-installation-40/script-wont-run-at-boot-168494/)

bugsbunny 04-10-2004 02:40 PM

Script won't run at boot
 
I have a script which i use to dial my adsl speedtouch modem. It is called speedial. I currently have it in /etc/rc.d/speedial. I expect it to be executed at bootime but it doesn't. However at the prompt when i dial /etc/rc.d/speedial it runs perfectly.

What is wrong here?

nhs 04-10-2004 04:50 PM

There is a directory /etc/rc.d/rc5.d (or /etc/rc5.d - I don't use know where slackware puts it) and init runs every script in that directory that starts with an S character in alphabetical order with the parameter start. You need to create a symlink from /etc/rc.d/speedial to /etc/rc.d/rc5.d/S99speedial. This will cause the script to be run at boot. The 99 is used to order the script to be run last (unless a S99tftp or similar exists) and you can use another number if you wish.

alienDog 04-11-2004 04:36 AM

... however slackware uses BSD style init instead of SystemV, so there is no rc4.d directory (or in fact any directory at all under rc.d). In principle the script should get run if it has execute (+x) bit set. You could ofcourse run your script from rc.local too...

gnashley 04-11-2004 10:24 AM

The proper Slack way would be to run it from rc.local.

bugsbunny 04-12-2004 04:53 AM

Thanks all especially gnashley and alienDog. It works now> I copied the script into rc.local and it now boots at start. By the way where have you guys been for the past week when i need your help :D :D

Thanks a lot

gnashley 04-12-2004 09:55 AM

BTW most scripts located in /etc/rc.d only run when called.
init automatically runs rc.S (which calls rc.modules) then rc.M (which calls rc.local).
init level 4 may omit rc.M. there was a post the other day that said so, but I haven't checked yet to see if it's so.

portux 04-19-2004 04:26 PM

http://www.slackware.org/config/init.php

[edit] I was wondering too...[/edit] :)


All times are GMT -5. The time now is 09:05 AM.