LinuxQuestions.org
Latest LQ Deal: Latest LQ Deals
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Server
User Name
Password
Linux - Server This forum is for the discussion of Linux Software used in a server related context.

Notices


Reply
  Search this Thread
Old 07-17-2008, 11:01 AM   #1
Avatar
Member
 
Registered: May 2001
Location: Canada
Distribution: old ones
Posts: 555

Rep: Reputation: 33
Red face Help, how to find boot order of scripts/services?


My server is running Ubuntu 7.10.

It runs squid/squidGuard and iptables for the firewall.

I have a firewall script I've named rc.firewall.

I forgot that whenever I change any firewall rules, all of a sudden users can no longer access Hotmail. This has been going on ever since I installed this Ubuntu server (previous one was Mandrake).

It has something to do with the order the firewall script is run - it has to be before or after squid. When I start the server up, the services start in the correct order because at one time I had it figured out. But if I change anything on the fly, and rerun the firewall script, Hotmail stops working.

It is only hotmail - we can access the login page but when you hit "sign in" you get "page cannot be displayed" - it does not happen for any other websites that use HTTPS that I have found.

We are serving public computers where the users check their email. So this has to be resolved.

I have looked in /etc/init.d but can't find any clues as to which file specifies the order the scripts start in. Of course I wrote it down a long time ago... but can't find it...

Thanks for any help.
 
Old 07-17-2008, 03:58 PM   #2
pruneau
Member
 
Registered: Jul 2008
Location: Montreal
Distribution: Debian/Fedora/RHEL
Posts: 45

Rep: Reputation: 15
Post

The process of figuring out the start order is relatively simple.
1- you find the run level you want to modify
2- you go ls into the relevant directory

A run level is basically what defines which service is run/offered by your machine.
The "/etc/inittab" file is at the center of it all, and on my debian box, says:
Quote:
# /etc/init.d executes the S and K scripts upon change
# of runlevel.
#
# Runlevel 0 is halt.
# Runlevel 1 is single-user.
# Runlevels 2-5 are multi-user.
# Runlevel 6 is reboot.
Which basically sums it all.
Usually, at the beginning of your file is the default runlevel, which looks like this on my debian box:
Quote:
id:2:initdefault:
But YMMV, and runlevel 5 is usually devoted to graphical mode (with an X11 login screen).
Once you figure your usual run level out, you go look into /etc/rcX.d, where X is your usual run level, and you'll find a bunch of symbolic links SNN<name> and KNN<name>.
Basically, when you enter a runlevel, the system execute all the SNN scripts in the order given by the numbers, and that's what you wanted to know.

Now of course, they are a bunch of text/graphic utilities that are going to do al the work for you, but I just wanted to give you enough basics.
If you want tools/more explanation, google "runlevel" "system V init scripts".
 
Old 07-29-2008, 10:05 AM   #3
Avatar
Member
 
Registered: May 2001
Location: Canada
Distribution: old ones
Posts: 555

Original Poster
Rep: Reputation: 33
pruneau,

Thank you that was exactly what I needed. I did find it exactly as you said, and now it works. thanks again
 
Old 07-29-2008, 10:21 PM   #4
chrism01
LQ Guru
 
Registered: Aug 2004
Location: Sydney
Distribution: Rocky 9.2
Posts: 18,356

Rep: Reputation: 2751Reputation: 2751Reputation: 2751Reputation: 2751Reputation: 2751Reputation: 2751Reputation: 2751Reputation: 2751Reputation: 2751Reputation: 2751Reputation: 2751
Write yourself a note for next time
 
Old 07-30-2008, 07:48 AM   #5
pruneau
Member
 
Registered: Jul 2008
Location: Montreal
Distribution: Debian/Fedora/RHEL
Posts: 45

Rep: Reputation: 15
Cool

You're welcome.
 
  


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
Where can I find the sequene of services started at boot? i_s Linux - General 8 03-02-2006 06:52 AM
order of services booting borovikov SUSE / openSUSE 3 04-14-2005 03:11 AM
How to change order services are started in? fclifton Red Hat 5 08-16-2004 07:08 PM
resort order of startup services robert_edwards Fedora 0 07-29-2004 06:30 AM
Services boot order in Mandrake 9.1 ccool Linux - General 4 08-05-2003 02:30 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Server

All times are GMT -5. The time now is 02:56 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