SlackwareThis Forum is for the discussion of Slackware Linux.
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
I've got a question about the startup scripts. What I'm wondering is how the scripts in rc.d work and what the order is. Do the the actual scripts such as rc.cups also need to appear in rc.M, for example, in order to get run. The reason I ask is that I've put a firewall script in /etc/rc.d/rc.firewall. Do I also need to put a line in rc.M for it to run?
Don't use slackware but on most Unix/Linux systems you have to have your primary script in a central location (usually /etc/init.d is there or is a symbolic link to where the correct directory is e.g. /etc/rc.d/init.d on RedHat EL AS 3).
You then have to create symbolic links to the specific script in a run level specific directory. (Debian has /etc/rc0.d through /etc/rc6.d and /etc/rcS.d for special single user, Redhat EL AS 3 has /etc/rc.d/rc0.d through /etc/rc.d/rc6.d). rc2.d for be for run level 2, rc1.d for be for run level 1 (single user) etc...
Within the run level specific directories you typically have files named S##script and K##script where script is the same as the base script name (from init.d) and ## is a numeric sequence indicating order to be executed. S means startup and K means (kill) shutdown.
So you would need to go the correct run level directory and create a symbolic link there back to the script you had created using the rules noted above.
Thanks, I'll read that soon. How do I know the order that scripts start? I suppose for example that the firewall is started before the network is. That link by the way isn't very slackware. I think what I'm trying to work out is the order the scripts start. I've just installed hplip for example. I need to put a script in rc.d, and it needs to start before cups. Someone else has put a line in rc.M, just before the cups entry. So some things need to be told when to start and others such as rc.firewall are automated?
Unless there is an absolute need the safest place for any 'non-Slackware' script is in /etc/rc.d/rc.local. Reason is you have fewer things to remember about where you made changes to stock installed scripts.
That said order is rc.S then rc.M
Being a really old Xtree Gold user I found mc (Midnight commander) to be invaluable and recommend installing same, then viewing [F3] the different scripts in /etc/rc.d/ . Of course can be done in a GUI but....
I'm actually trying for nth time to install hplip successfully. The script works ok. It starts before cups. But can I get my scanner to run? No. The hplip is really built for non slackware distros. It installs the script automatically if you've got init.d for it. Apparently it also uses different path/to/sane/libraries than slackware as well. But I just can't get it to work. It's times like these when I long to reinstall Mandriva. Anyway, who needs a scanner.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.