You are not logged in.

#1 2011-01-02 16:01:02

hiushoz
Member
Registered: 2010-12-09
Posts: 41

A stupid question about internet connection. [SOLVED]

By default I don't want to be connected to the internet at boot and furthermore not trying to connect to the internet at boot time saves me a few seconds. Thus in my /etc/rc.conf I edited my DAEMONS line from:
DAEMONS=(syslog-ng network netfs crond)
to:
DAEMONS=(syslog-ng crond)
This did indeed speed up boot considerably. However to manually connect to the internet I go:
dhcpcd
This usually works and I'm connected. Now what I'm wondering is if I didn't edit my daemons line and still had the network daemon would the daemon just run dhcpcd in the background? By the way my eth0 line is eth0="dhcp". Thus I assume my guess is correct and from my reading it seems so too. I just want to understand what is going on. If I am right in my understanding please confirm this. If I am wrong please correct me.

Last edited by hiushoz (2011-01-03 02:06:43)

Offline

#2 2011-01-02 16:19:58

MadTux
Member
Registered: 2009-09-20
Posts: 553

Re: A stupid question about internet connection. [SOLVED]

The entry "network" in the daemons section does what is in

etc/rc.d/network

You can check yourself what this is doing since it is a script.

Offline

#3 2011-01-02 17:00:12

hiushoz
Member
Registered: 2010-12-09
Posts: 41

Re: A stupid question about internet connection. [SOLVED]

thanks bro i'll check it out

Offline

#4 2011-01-02 17:12:30

karol
Archivist
Registered: 2009-05-06
Posts: 25,440

Re: A stupid question about internet connection. [SOLVED]

Why not try '@network'?

Offline

#5 2011-01-02 17:22:37

Xyne
Administrator/PM
Registered: 2008-08-03
Posts: 6,963
Website

Re: A stupid question about internet connection. [SOLVED]

Instead of running dhcpcd yourself, you could just run "/etc/rc.d/network start" in a terminal when you want to start it (and bring up the network), then "... stop" when you want to stop it.

You should also know that if you add "@" to a daemon in your DAEMONS array, it will be started in the background, e.g. "@network". That way you don't have to wait for it. You probably want to start crond in the background at least.

Last edited by Xyne (2011-01-02 17:25:08)


My Arch Linux StuffForum EtiquetteCommunity Ethos - Arch is not for everyone

Offline

#6 2011-01-02 22:44:12

hiushoz
Member
Registered: 2010-12-09
Posts: 41

Re: A stupid question about internet connection. [SOLVED]

MadTux I checked it out but while I am familiar with bash scripting I'm not that knowledgable to fully understand what it does.

Karol and Xyne. Thanks. I actually did consider putting the network daemon in the background. However the problem with that is I don't want to be connected to the internet all the time. I want to be able to manually enable disable it. You helped answer the disable part by the way Xyne so thank you. Also I will research about /etc/rc.d/network. The problem is I don't know how much of the script I'll understand.

You showed me how to start and stop it with the respective arguments. The question that now arises is what network exactly is started and stopped by this command? Wired or wireless? What you wrote doesn't seem to have an argument specifying the network. Can one be provided? If so how? Also if not is there a way to configure a default?

Also you say to put crond in the background. But what exactly is crond? Running whatis crond in the shell didn't help btw? Also I don't understand everything I Google either so feel free to clue me in. Again thx for the help bro.

Offline

#7 2011-01-02 22:47:38

karol
Archivist
Registered: 2009-05-06
Posts: 25,440

Re: A stupid question about internet connection. [SOLVED]

crond is cron daemon: http://en.wikipedia.org/wiki/Cron http://en.wikipedia.org/wiki/Daemon_(computer_software)

Last edited by karol (2011-01-02 22:50:42)

Offline

#8 2011-01-02 23:05:11

hiushoz
Member
Registered: 2010-12-09
Posts: 41

Re: A stupid question about internet connection. [SOLVED]

Karol thanks. Cron is actually pretty awesome I must say. smile. Btw is there a command which will tell me what daemons are available or what kinds of programs can run as a daemon?

Offline

#9 2011-01-02 23:08:55

karol
Archivist
Registered: 2009-05-06
Posts: 25,440

Re: A stupid question about internet connection. [SOLVED]

Rule #1: use Google.
Rule #2: check the wiki: https://wiki.archlinux.org/index.php/Daemon :-)

Last edited by karol (2011-01-02 23:09:48)

Offline

#10 2011-01-02 23:09:13

jac
Member
From: /home/jac
Registered: 2009-05-19
Posts: 431
Website

Re: A stupid question about internet connection. [SOLVED]

hiushoz wrote:

... is there a command which will tell me what daemons are available or what kinds of programs can run as a daemon?

ls /etc/rc.d/

Will tell you what Arch will recognize if you put it in the daemons array. However, there are other programs that can be "daemonized" with out needing a script there, you will find those through experience mostly.

Offline

#11 2011-01-03 00:58:52

hiushoz
Member
Registered: 2010-12-09
Posts: 41

Re: A stupid question about internet connection. [SOLVED]

jac thanks. Karol thanks for the third link it was the most informative of the three. If only I could say the same for the first few results of a Googlee search...

Offline

#12 2011-01-03 10:17:17

Xyne
Administrator/PM
Registered: 2008-08-03
Posts: 6,963
Website

Re: A stupid question about internet connection. [SOLVED]

hiushoz wrote:

Karol and Xyne. Thanks. I actually did consider putting the network daemon in the background. However the problem with that is I don't want to be connected to the internet all the time. I want to be able to manually enable disable it. You helped answer the disable part by the way Xyne so thank you. Also I will research about /etc/rc.d/network. The problem is I don't know how much of the script I'll understand.

You showed me how to start and stop it with the respective arguments. The question that now arises is what network exactly is started and stopped by this command? Wired or wireless? What you wrote doesn't seem to have an argument specifying the network. Can one be provided? If so how? Also if not is there a way to configure a default?

The network daemon controls the interfaces that you specify in /etc/rc.conf, which you've already configured during installation. Starting the daemon will bring up all of those interfaces, stopping it will bring all of them down. You can also bring up individual interfaces. Run the daemon without any arguments and it will spit out a list of arguments that you can use.

If you don't understand the rc.conf file or the network daemon then you should read up about them on the wiki:
https://wiki.archlinux.org/index.php/Rc.conf
https://wiki.archlinux.org/index.php/Network


If there is something specific that you don't understand then just ask, but in general you should develop the habit of digging into the documentation yourself. It might seem impenetrable at first, but you'll learn quickly. Always start with the Arch wiki for anything related to Arch.


My Arch Linux StuffForum EtiquetteCommunity Ethos - Arch is not for everyone

Offline

Board footer

Powered by FluxBB