UGN Security Forums
My ProfileMember DirectoryLogin
Search our ForumsView our FAQView our Site Rules
View our CalendarView our Active TopicsGo to our Main Page

UGN Security Store
 

Network Sites UGN Security, The GoNix Initiative, Elite Web Gamers, Back of the Web, EveryDay Helper, VNC Web Design & Development
Sponsored Links
Latest Postings
Latest Reviews
Topic Options
Rate This Topic
#16186 - 02/13/04 03:50 AM slackware startup scripts
Gollum Offline
Member

Registered: 06/05/02
Posts: 207
Loc: US
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

Top
Sponsored Links
      
#16187 - 02/13/04 11:15 AM Re: slackware startup scripts
sinetific Offline
nobody

Registered: 03/02/02
Posts: 815
Loc: Ann Arbor
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

Top
#16188 - 02/13/04 10:41 PM Re: slackware startup scripts
Gollum Offline
Member

Registered: 06/05/02
Posts: 207
Loc: US
#!/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
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

Top
#16189 - 02/14/04 04:24 AM Re: slackware startup scripts
sinetific Offline
nobody

Registered: 03/02/02
Posts: 815
Loc: Ann Arbor
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.

Top
#16190 - 03/07/04 11:59 AM Re: slackware startup scripts
Gollum Offline
Member

Registered: 06/05/02
Posts: 207
Loc: US
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

Top

Moderator:  Infinite 
Featured Member
Registered: 02/28/02
Posts: 7193
Forum Stats
2148 Members
46 Forums
35119 Topics
70289 Posts

Max Online: 1567 @ 04/25/10 05:20 AM
Top Posters
UGN Security 28281
Gremelin 7193
§intå× 3255
SilentRage 1273
Ice 1146
pergesu 1136
Infinite 1041
jonconley 955
Girlie 908
unreal 860
Newest Members
Tim050, Gecko666, defghi795767, Devo60, ali
2148 Registered Users
Who's Online
0 registered (), 354 Guests and 274 Spiders online.
Key: Admin, Global Mod, Mod
Latest News


Donate
  Get Firefox!
Get FireFox!