Linode.com Forum Forum Index Linode.com Forum
Linode Community Forums
 


Debian question

Click here to go to the original topic

 
       Linode.com Forum Forum Index -> Linux Networking
Author Message
shahim



Joined: 13 Feb 2004
Posts: 8

Posted: Fri Feb 13, 2004 5:28 am    Post subject: Debian question  

I am new to linux/debian. I am trying to figure out where during boot is the network configuration taking place.
From reading, I know that /etc/network/interfaces is the configuration file for ifup and ifdown and the changes I make are working but I can't seem to figure out when are these commands called during bootup.
Thanks,
Shahim
Back to top  
blahrus



Joined: 19 Jan 2004
Posts: 35
Location: Bloomington, IL

Posted: Fri Feb 13, 2004 9:11 am    Post subject:  

what are you trying to change in the boot-up?
Back to top  
Bill Clinton



Joined: 23 Nov 2003
Posts: 79

Posted: Fri Feb 13, 2004 10:03 am    Post subject: Re: Debian question  

shahim wrote: I can't seem to figure out when are these commands called during bootup.

They are called in /etc/init.d/networking

Specifically line 124:
Code:        echo -n "Configuring network interfaces: "
       ifup -a
       echo "done."
Bill Clinton
Back to top  
shahim



Joined: 13 Feb 2004
Posts: 8

Posted: Sun Feb 15, 2004 1:49 am    Post subject:  

Bill,

I don't have a link in rc2.d to /etc/init.d/networking. Does it get called from anywher else?

Shahim
Back to top  
Xan



Joined: 08 Feb 2004
Posts: 311
Location: Austin

Posted: Sun Feb 15, 2004 2:18 am    Post subject:  

By default in Debian, the network is started in runlevel 0.

Specifically, /etc/rc0.d/S35networking is a symlink to /etc/init.d/networking.
Back to top  
shahim



Joined: 13 Feb 2004
Posts: 8

Posted: Sun Feb 15, 2004 2:33 am    Post subject:  

Isn't run level 0 used to halt the system? I am new to linux and appreciate your answers.
Back to top  
Xan



Joined: 08 Feb 2004
Posts: 311
Location: Austin

Posted: Sun Feb 15, 2004 2:41 am    Post subject:  

Other distributions may be different; I've really only had much experience with Gentoo and Debian.

My understanding is that when you boot up in runlevel 2 (or whatever) you've run all the lower runlevels in order. So on startup, all the files in rc0.d starting with S are run, then the ones in rc1.d, etc. When a runlevel is exited the K files are run in the reverse order.

If anybody knows this is wrong, please correct me, but AFAIK that's how Debian handles startup and shutdown.
Back to top  
shahim



Joined: 13 Feb 2004
Posts: 8

Posted: Sun Feb 15, 2004 2:50 am    Post subject:  

After some reading I think I found the answer.
First, inittab is ran, during that /etc/init.d/rcS is called.
rcS calls all the S scripts in /ect/rcS.d/ directory which does have a link to /etc/init.d/networking and some other links.

The other rc?.d directories are only called at their level.

link: http://www.debian.org/doc/debian-policy/ch-opersys.html#s9.3.4

If I am wrong please correct me.
Back to top  
Xan



Joined: 08 Feb 2004
Posts: 311
Location: Austin

Posted: Sun Feb 15, 2004 3:04 am    Post subject:  

Great reference there. Should have checked for one myself first. Looks like your reading is spot on.

Thanks for the education!
Back to top  
 
       Linode.com Forum Forum Index -> Linux Networking
Page 1 of 1