LinuxQuestions.org
Latest LQ Deal: Latest LQ Deals
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Slackware
User Name
Password
Slackware This Forum is for the discussion of Slackware Linux.

Notices


Reply
  Search this Thread
Old 12-05-2005, 09:09 AM   #1
simcox1
Member
 
Registered: Mar 2005
Location: UK
Distribution: Slackware
Posts: 794
Blog Entries: 2

Rep: Reputation: 30
Startup scripts


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?
 
Old 12-05-2005, 09:19 AM   #2
keefaz
LQ Guru
 
Registered: Mar 2004
Distribution: Slackware
Posts: 6,552

Rep: Reputation: 872Reputation: 872Reputation: 872Reputation: 872Reputation: 872Reputation: 872Reputation: 872
You don't need to add a line, just chmod +x /etc/rc.d/rc.firewall

It will be executed by /etc/rc.d/rc.inet2 at boot
 
Old 12-05-2005, 09:22 AM   #3
MensaWater
LQ Guru
 
Registered: May 2005
Location: Atlanta Georgia USA
Distribution: Redhat (RHEL), CentOS, Fedora, CoreOS, Debian, FreeBSD, HP-UX, Solaris, SCO
Posts: 7,831
Blog Entries: 15

Rep: Reputation: 1669Reputation: 1669Reputation: 1669Reputation: 1669Reputation: 1669Reputation: 1669Reputation: 1669Reputation: 1669Reputation: 1669Reputation: 1669Reputation: 1669
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.
 
Old 12-05-2005, 09:25 AM   #4
keefaz
LQ Guru
 
Registered: Mar 2004
Distribution: Slackware
Posts: 6,552

Rep: Reputation: 872Reputation: 872Reputation: 872Reputation: 872Reputation: 872Reputation: 872Reputation: 872
No, slackware has a BSD init scripts structure,
it does not use /etc/init.d/* scripts like many other Linux distributions

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

Last edited by keefaz; 12-05-2005 at 09:26 AM.
 
Old 12-05-2005, 09:27 AM   #5
Fritz_Monroe
Member
 
Registered: Nov 2004
Location: Maryland, USA
Distribution: Mint 13
Posts: 276

Rep: Reputation: 31
Here's what appears to be a pretty decent write up about the boot process.

http://www.comptechdoc.org/os/linux/...rks/index.html
 
Old 12-05-2005, 10:24 AM   #6
simcox1
Member
 
Registered: Mar 2005
Location: UK
Distribution: Slackware
Posts: 794

Original Poster
Blog Entries: 2

Rep: Reputation: 30
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?
 
Old 12-05-2005, 04:39 PM   #7
PDock
Member
 
Registered: Aug 2004
Distribution: Slack10 & curr. tried numerous
Posts: 189

Rep: Reputation: 37
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....

ppd
 
Old 12-05-2005, 05:04 PM   #8
simcox1
Member
 
Registered: Mar 2005
Location: UK
Distribution: Slackware
Posts: 794

Original Poster
Blog Entries: 2

Rep: Reputation: 30
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.
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Startup scripts MadnessASAP Linux - Software 2 12-15-2004 07:09 PM
startup scripts doralsoral Linux - Software 6 01-12-2004 03:46 PM
startup scripts mimi Linux - Newbie 6 04-26-2002 03:09 AM
startup scripts mimi Linux - General 1 04-24-2002 03:22 AM
X Startup Scripts JHuizingh Linux - General 1 09-18-2001 01:02 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Slackware

All times are GMT -5. The time now is 03:02 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration