You are not logged in.

#1 2009-09-27 18:23:19

alexmatos
Member
From: Rio de Janeiro, Brasil
Registered: 2007-08-06
Posts: 124

Auto connect to wireless when available in netcfg2

I want to be able to automatically detect that a network (with has a profile in '/etc/network.d') is available and connect to it (similiar to what NetworkManager does) using netcfg2. Is there any way to do it? Here's the relevant bit of my '/etc/rc.conf':

...
NETWORKS=(ethernet)
AUTO_NETWORKS=(auto-wireless wlan0)
...
DAEMONS=(syslog-ng @net-profiles @net-auto netfs crond @cpufreq @sensors alsa hal fam @mysqld !mpd @sshd @openntpd @httpd gdm)
...

Thanks a lot!
Alex Tercete

Offline

#2 2009-09-29 12:08:23

alexmatos
Member
From: Rio de Janeiro, Brasil
Registered: 2007-08-06
Posts: 124

Re: Auto connect to wireless when available in netcfg2

Is it impossible to do it with netcf2?

Offline

#3 2009-10-13 02:42:36

alexmatos
Member
From: Rio de Janeiro, Brasil
Registered: 2007-08-06
Posts: 124

Re: Auto connect to wireless when available in netcfg2

Anybody?

Offline

#4 2009-10-13 02:53:31

firecat53
Member
From: Lake Stevens, WA, USA
Registered: 2007-05-14
Posts: 1,542
Website

Re: Auto connect to wireless when available in netcfg2

What you have there should work on boot if you take out the NETWORKS line -- I have roughly the same thing in my rc.conf. If you want something like network manager for switching networks on the fly, check out the wifi-select package in community.

My daemons line reads:

DAEMONS=(syslog-ng netfs @net-auto @net-profiles @crond @anacrond @alsa @hal @avahi-daemon @cups @mpd @laptop-mode @mysqld @lighttpd)

Good luck!
Scott

Offline

#5 2009-10-13 09:30:50

iphitus
Forum Fellow
From: Melbourne, Australia
Registered: 2004-10-09
Posts: 4,927

Re: Auto connect to wireless when available in netcfg2

netcfg now does this. It's in the next release. I've been using it on my laptop for the last few weeks and it works brilliantly.

You can try the alpha here: http://mess.iphitus.org/netcfg-2.5.0a1-1-any.pkg.tar.gz
Source tarball is in the normal spot on ftp.

There is some really primitive documentation here: http://wiki.archlinux.org/index.php/Net … evelopment

I will make a release shortly when I fix a couple of bugs and can update the proper documentation.

Last edited by iphitus (2009-10-13 09:34:51)

Offline

#6 2009-10-13 12:21:07

alexmatos
Member
From: Rio de Janeiro, Brasil
Registered: 2007-08-06
Posts: 124

Re: Auto connect to wireless when available in netcfg2

firecat53 wrote:

What you have there should work on boot if you take out the NETWORKS line -- I have roughly the same thing in my rc.conf. If you want something like network manager for switching networks on the fly, check out the wifi-select package in community.

I already use wifi-select, but thanks anyway for your answer!

iphitus wrote:

netcfg now does this. It's in the next release. I've been using it on my laptop for the last few weeks and it works brilliantly.

You can try the alpha here: http://mess.iphitus.org/netcfg-2.5.0a1-1-any.pkg.tar.gz
Source tarball is in the normal spot on ftp.

There is some really primitive documentation here: http://wiki.archlinux.org/index.php/Net … evelopment

I will make a release shortly when I fix a couple of bugs and can update the proper documentation.

Sweet! Thanks a lot!

Offline

#7 2009-10-13 13:10:08

Pank
Member
From: IT
Registered: 2009-06-13
Posts: 371

Re: Auto connect to wireless when available in netcfg2

iphitus wrote:

netcfg now does this. It's in the next release. I've been using it on my laptop for the last few weeks and it works brilliantly.

You can try the alpha here: http://mess.iphitus.org/netcfg-2.5.0a1-1-any.pkg.tar.gz
Source tarball is in the normal spot on ftp.

Hello,
It seems there is a small `bug'. Before, netcfg was not so careful about the output of POST_UP and PRE_DOWN. Now, it seems, it will not connect/disconnect if the script it not executed properly. For example: I mount an ftp drive and some nfs drives when I connect to my home drive. When I disconnect they are umounted by a script. If I umount one of them before I cannot disconnect.
If I remove the umount script and just disconnect I cannot reconnect using netcfg because

mount.nfs: [DRIVE] is busy or already mounted

and this will throw an error.

I liked the old behavior, where netcfg did not care about such messages, better.

Cheers,
Rasmus


Arch x64 on Thinkpad X200s/W530

Offline

Board footer

Powered by FluxBB