Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
Init order
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Other Things Gentoo
View previous topic :: View next topic  
Author Message
/
n00b
n00b


Joined: 14 Aug 2002
Posts: 26

PostPosted: Sun Oct 20, 2002 1:08 pm    Post subject: Init order Reply with quote

Hi,

Is there a way to find out in what order the scripts in /etc/runlevels will be executed? This is one thing I find missing from Gentoo. With the traditional sysV style scripts finding out what gets executed in what order is easy.
While Gentoo's aproach has its advantages I wish for two things:
- A command that does a sort of "fake" init. Just shows which scripts will be run upon boot, and in what order.
- A way to look at what the init scripts put out on the terminal after one has booted. Error messages just scroll by too fast. And since I don't know in what oreder everythign is started I don't even have a clue as to which scripts are causing the errors...
Back to top
View user's profile Send private message
guero61
l33t
l33t


Joined: 14 Oct 2002
Posts: 811
Location: Behind you

PostPosted: Mon Oct 21, 2002 2:51 am    Post subject: Reply with quote

I don't know if there's a way to see (I'd check, but I rebooted to M$ to finish off a class assignment :evil:), but the Gentoo inits do a really good job of checking dependencies and making stuff come up in order.

[edit]
If you used ksyslogd, most of those scripts' outputs are saved in /var/log (at least they are on RH). Otherwise, I don't know; I'd like to know myself. You may want to try using "Scroll Lock", seems to work well for me when I want to actually read what's going by.
[/edit]
Back to top
View user's profile Send private message
/
n00b
n00b


Joined: 14 Aug 2002
Posts: 26

PostPosted: Mon Oct 21, 2002 12:13 pm    Post subject: Reply with quote

guero61 wrote:
, but the Gentoo inits do a really good job of checking dependencies and making stuff come up in order.


I know that, and this is an improvement over the old style SysV scripts. But I'd like to know what this proper order everything comes up in is. It is not sufficient for me to know that a good job is being done. I want to know the result.

I was hoping someone already had made a script or command or something that when run gives you the list of scripts run upon boot, in the order that they are going to be run at boot.

Failing such a script I'll probably have to bang something together myself. But I find it odd that I'm apparently the only one suffering from this itch...
Back to top
View user's profile Send private message
jondkent
Apprentice
Apprentice


Joined: 26 Jul 2002
Posts: 289
Location: London

PostPosted: Mon Oct 21, 2002 2:54 pm    Post subject: Reply with quote

Have a look /sbin/rc script for details on this. Should cover what you require. Re which order its seems to do a
for i in $dir
and runs each script in turn.

I'd have a guess that this is alphabetical order, but that is a guess.

Jon

###Edit####
I hope that my guess in incorrect btw, otherwise it might be worth using the usual S##[filename] format to ensure the order. Anyone know for sure??
Back to top
View user's profile Send private message
jondkent
Apprentice
Apprentice


Joined: 26 Jul 2002
Posts: 289
Location: London

PostPosted: Mon Oct 21, 2002 9:53 pm    Post subject: Reply with quote

OK all the information you need is in the init system documentation @

http://www.gentoo.org/doc/rc-scripts.html

Seems to cover all the bases and it is parsed in alphabetical order unless stated otherwise within the rc script

Jon
Back to top
View user's profile Send private message
/
n00b
n00b


Joined: 14 Aug 2002
Posts: 26

PostPosted: Tue Oct 22, 2002 6:48 am    Post subject: Reply with quote

jondkent wrote:
OK all the information you need is in the init system documentation @

http://www.gentoo.org/doc/rc-scripts.html

Seems to cover all the bases and it is parsed in alphabetical order unless stated otherwise within the rc script

Jon


No it isn't. I've read that extensively. Although the documentation does say how the system goes about determining in what order to start the scripts, it does not say how I can find out what the result of this determination is going to be, other then going through each file and drawing up a dependancy tree by hand.

I know I could work it out by hand. Write down all the dependancies of all the different scripts, figure out what the system would do. I could do this, I know how the rc scripts work.
But I want the computer to do this for me.

Maybe I need to restate the question...

I know that given three scripts, called aa, bb and cc, that upon boot the system will atempt to run them in alfabetical order. But suppose that aa depends on bb and cc, and cc depends on bb, then the order will become bb, then cc, and finally aa.

But I can't figure this out by just looking at the /etc/init.d directory, or the /etc/runlevels/* directories. Not like you can find this out by looking at the /etc/rc.* dirs on traditional Unix systems.

What I want is to type in a command, call it "rc-show" for the sake of this example, and have it give me the order scritps will be executed upon init.
eg.
Code:

# rc-show
Runlevel boot:
bb
cc
aa
Runlevel default:
...

As aparently such a command or script isn't yet present. I'll see if I can put something together myself.
Back to top
View user's profile Send private message
/
n00b
n00b


Joined: 14 Aug 2002
Posts: 26

PostPosted: Fri Oct 25, 2002 8:14 am    Post subject: Reply with quote

On thing I found out is that you can go to /mnt/.init.d/started and do an ls -lt there...

This lists what has been started at the last boot, and in what order...
Back to top
View user's profile Send private message
pjp
Administrator
Administrator


Joined: 16 Apr 2002
Posts: 20094

PostPosted: Mon Jan 20, 2003 9:27 pm    Post subject: Reply with quote

Moved from Installing Gentoo.
_________________
Quis separabit? Quo animo?
Back to top
View user's profile Send private message
Ralphus Maximus
Tux's lil' helper
Tux's lil' helper


Joined: 22 Jul 2002
Posts: 148
Location: At Large

PostPosted: Mon Jan 20, 2003 11:37 pm    Post subject: Reply with quote

guero61 wrote:
You may want to try using "Scroll Lock", seems to work well for me when I want to actually read what's going by.


Scroll lock doesn't seem to work for me, but I can use CTRL-S and CTRL-Q to stop and start the scrolling.

Cheers,
RM
_________________
Hero for hire. Dragons rescued, Virgins slain.

You say "Cheesy" like it's a bad thing!

In a society that is drug infested, violence-wracked and polluted by chemical greed, no one has ever died from an overdose of pornography.
Back to top
View user's profile Send private message
ebrostig
Bodhisattva
Bodhisattva


Joined: 20 Jul 2002
Posts: 3152
Location: Orlando, Fl

PostPosted: Tue Jan 21, 2003 12:11 am    Post subject: Reply with quote

I suggest something very simple.
The whole boot process and the order of which the various parts are executed, can be found if you read the /sbin/rc file which is a shell script.

It's pretty well documented and should give you a good understanding of the boot-process.

Erik
_________________
'Yes, Firefox is indeed greater than women. Can women block pops up for you? No. Can Firefox show you naked women? Yes.'
Back to top
View user's profile Send private message
mpool
n00b
n00b


Joined: 16 Dec 2002
Posts: 26

PostPosted: Sun Jan 25, 2004 11:19 pm    Post subject: want similar thing Reply with quote

I understand how the boot process works. It would be nice however to have little tool to print out exactly what order the particular scripts on a given system are being run without doing the mental gymnastics of going through each script in turn to find out what it depends on.

To get a list, you can generate a dependancy cache (with quite a lot of extra info you don't need if you just want a list of scripts in order). Here's how:

As root:
Code:

export RC_DEBUG=yes
depscan.sh


Then sift through /var/lib/init.d/depcache to get your order.

I might write a little script to do print out a nice list if no one tells me one already exists.

Madeline


[EDIT]Sorry. This is nonsense. It will give you a list of any scripts that you have in init.d not in any particular order, with what each depends upon. It just looked like the right order when I took a quick look on my machine but then I realised there was stuff in there which I haven't added to a run level. Me dumb.[/EDIT]
Back to top
View user's profile Send private message
DeathAndTaxes
Tux's lil' helper
Tux's lil' helper


Joined: 27 Mar 2003
Posts: 124

PostPosted: Sun Nov 14, 2004 9:57 pm    Post subject: Reply with quote

frickin' bump, please. Anyone got this figured out?

:-)
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Other Things Gentoo All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum