Previous Thread
Next Thread
Print Thread
Rate Thread
#16186 02/13/04 01:50 AM
Joined: Jun 2002
Posts: 207
Gollum Offline OP
Member
OP Offline
Member
Joined: Jun 2002
Posts: 207
ok, this is the one things that's bothering me with slackware. the startup scripts. now, if i've figured everything correctly, slackware uses sysvinit start scripts. which are a bit more complicated in that they require a "start|stop|restart" type deal. also, they're located in "/etc/rc.d/" now this is where i get confused. are all the scripts called rc.* in that directory supposed to run...with the exception of the runlevel one's which only like, rc.4 will run during runlevel 4 and rc.6 during runlevel 6. the problem i have, is that i have scripts in the directory which don't run. for instance, rc.httpd and rc.snort. the httpd one runs fine, but the snort one won't. same with my webmin script that dones't run, but say, rc.mysqld runs fine. why is this? is there somethign i'm missing?//


Unbodied unsouled unheard unseen
Let the gift be grown in the time to call our own
Truth is natural like a wind that blows
Follow the direction no matter where it goes
Let the truth blow like a hurricane through me
Joined: Mar 2002
Posts: 815
S
nobody
Offline
nobody
S
Joined: Mar 2002
Posts: 815
slackware doesnt use sysvinit scripts it uses BSD style.

Open /etc/rc.d/rc.local with your favorite text editor and add the following line to the bottom.

/usr/local/apache/bin/apachectl start

Joined: Jun 2002
Posts: 207
Gollum Offline OP
Member
OP Offline
Member
Joined: Jun 2002
Posts: 207
#!/bin/sh
#
# /etc/rc.d/rc.local: Local system initialization script.
#
# Put any local setup commands in here:
/etc/webmin/start >/dev/null 2>&1 </dev/null # Start Webmin

echo "Running the Emerde's scripts"
for d in $(/bin/ls -1 -B /etc/init.d)
do
if [ -x /etc/init.d/$d ]
then
/etc/init.d/$d start
fi
done


that's my rc.local file. the only one it runs is the startup for webmin....which doesnt start. should i be placing my startup scripts in init.d?//


Unbodied unsouled unheard unseen
Let the gift be grown in the time to call our own
Truth is natural like a wind that blows
Follow the direction no matter where it goes
Let the truth blow like a hurricane through me
Joined: Mar 2002
Posts: 815
S
nobody
Offline
nobody
S
Joined: Mar 2002
Posts: 815
hmm maybe the file permissions or group?

are you using emerde? I tried it and noticed a lot of bugs. I wouldn't use anything like emerde -U world or system since gentoo and slackware are quite different systems.

ya i need to go back and re-evalute posting the link to emerde and put a caution with it.

Joined: Jun 2002
Posts: 207
Gollum Offline OP
Member
OP Offline
Member
Joined: Jun 2002
Posts: 207
I dont' know how many other people were confused by the way Slackware works it's startup scripts. But I was. It's actually easier than other version of linux...but because it retains it's backwards compatability with most of them, it makes things a bit more complicated.
But, I did a lot of reading and looking at them, so I figure, just in case anyone else out there had questions, they could find the answer here.
Not all of what I say here will be the same for some people. For instance, I moved all my networking parts to rc.inet2...where as in the default installation, i believe they'll be under rc.M.
Basically, it's simplicity. I was confused that some of the scripts in the /etc/rc.d directory seemed to be getting run, while others didn't. But that's simplys because they were never called. The scripts work in this order. rc.S is called when you're system boots up. It does things like mounting the root filesystem, checking it, mouting other filesystems, removing temp files, displaying the MOTD, setting the hardware clock, setting up ISA PnP devices, loading Modules (by running /etc/rc.d/rc.modules), and running scripts to set up the serial port (etc/rc.d/rc.serial). When it's running other scripts, it always checks first to make sure they're set to executable. If not, it'll skip them. Then, when a runlevel is set, it'll run the rc script for that runlevel. For instance, rc.4 runs the session manager. It'll look for GDM, KDM, and finally XDM. rc.M however will run everytime you enter a multi-user session. which is runlevels 1-6.
rc.M is what calls most programs and other things. This sets up everything. Internet and networking scripts for hardware and services, PCMCIA devices, logs/loggers, removes more temp and junk files, filesystem permissions, updates libraries and fonts, starts the cups server, hard drive monitors, crond, sets quotas, ACPI, loads the ALSA script, custom user options such as font, keyboard style, starts gdm, and even starts the SystemV script and the rc.local script. Some of the important scripts it calls (By important, i mean one's that are interesting. Filesystem permissions and starting crond are important, but not very fun.) are the network init scripts (rc.inet1, rc.inet2), ALSA, and calling rc.local. The inet scripts contain all the information for starting up your network services and hardware. rc.inet1 will set up your hardware, and then it'll call rc.inet2. inet2 will call rc.inetd, which using /etc/inetd.conf will start up a variety of services. Just scroll though /etc/inetd.conf to see what I mean. Most anything from echo (Port 7), to FTP, to kerberos, finger, netstat, auth, RPC. Almost everything. After that, inet2 will take back control from inetd and begin running more scripts. It will call your SSH server up, BIND, NIS, NFS, and then a few others which are commented out. This is where I added to start all my server daemons. Nessus, MySql, Snort, Appletalk, Apache and Samba. Even though I dont' NEED them, I still keep my rc.httpd, rc.mysql, etc...files in to /etc/rc.d directory, and I call those when starting the programs. This makes things easier and if i want to stop calling a program while starting up, I can simply change it to be an unexecutable file and the script will skip it. Although a lot of these seems fairly easy to figure out, I figured I'd type it all out, seeing as how I spent a little while trying to figure out exactly how Slackware worked it's startup deal. Only a few resources went into detail on it, and those that did were sometimes incorrect. Well that is, without pouring through pages of Slack documentation. Anyway, since I've figured this out, it has made things much easier and so I figured I'd share it around. I must say, aftering learning about it, I really like the way Slackware deals with it's startup scripts. All except where they would call some of the others. Such as calling the webserver from rc.M. I just figure a network service should be called from the scripts that call network services. Well maybe I'm just picky...but it makes sense.//


Unbodied unsouled unheard unseen
Let the gift be grown in the time to call our own
Truth is natural like a wind that blows
Follow the direction no matter where it goes
Let the truth blow like a hurricane through me

Link Copied to Clipboard
Member Spotlight
Phatal
Phatal
Houston, TX
Posts: 298
Joined: April 2004
Forum Statistics
Forums41
Topics33,840
Posts68,858
Average Daily Posts1
Members2,176
Most Online3,253
Jan 13th, 2020
Latest Postings
Where and how do you torrent?
by danni75 - 03/01/24 05:58 AM
Animation,
by JohanKaariainen - 08/15/19 01:18 AM
Blackbeard.....
by Gremelin - 10/03/18 07:02 PM
my old account still exists!
by Crime - 08/10/18 02:47 PM
Okay WTF?
by HenryMiring - 09/27/17 01:45 AM
The History Thread...
by Gremelin - 08/11/17 12:11 PM
My friend NEEDS your HELP!
by Lena01 - 07/21/17 12:06 AM
I'm having fun with this guy.
by gabithompson730 - 07/20/17 01:50 AM
I want to upgrade my phone
by gabithompson730 - 07/20/17 01:49 AM
Doom 3
by Cyrez - 09/11/14 08:58 PM
Amazon Gift Card Generator/KeyGen?te
by Gecko666 - 08/22/14 09:21 AM
AIM scene 99-03
by lavos - 09/02/13 08:06 AM
Planetside 2
by Crime - 03/04/13 07:10 AM
Beta Testers Wanted
by Crime - 03/04/13 06:55 AM
Hello Everyone
by Gremelin - 02/12/12 06:01 PM
Tracfone ESN Generator
by Zanvin Green - 01/18/12 01:31 PM
Python 3 issue
by Testing - 12/17/11 09:28 PM
tracfone airtime
by Drache86 - 07/30/11 03:37 AM
Backdoors and the Infinite
by ZeroCoolStar - 07/10/11 03:52 AM
HackThisZIne #12 Releaseed!
by Pipat2 - 04/28/11 09:20 PM
gang wars? l33t-wars?
by Gremelin - 04/28/11 05:56 AM
Consolidate Forums
by diggin2deep - 04/21/11 10:02 AM
LAN Hacking Noob
by Gremelin - 03/12/11 12:42 AM
Top Posters
UGN Security 41,392
Gremelin 7,203
§intå× 3,255
SilentRage 1,273
Ice 1,146
pergesu 1,136
Infinite 1,041
jonconley 955
Girlie 908
unreal 860
Top Likes Received
Ghost 2
Cyrez 1
Girlie 1
unreal 1
Crime 1
Powered by UBB.threads™ PHP Forum Software 7.7.5