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

8 Replies

what are you trying to change in the boot-up?

@shahim:

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:

       echo -n "Configuring network interfaces: "
       ifup -a
       echo "done."

Bill Clinton

Bill,

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

Shahim

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

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

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

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.

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 … tml#s9.3.4">http://www.debian.org/doc/debian-policy/ch-opersys.html#s9.3.4

If I am wrong please correct me.

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

Thanks for the education!

Reply

Please enter an answer
Tips:

You can mention users to notify them: @username

You can use Markdown to format your question. For more examples see the Markdown Cheatsheet.

> I’m a blockquote.

I’m a blockquote.

[I'm a link] (https://www.google.com)

I'm a link

**I am bold** I am bold

*I am italicized* I am italicized

Community Code of Conduct