You are not logged in.

#1 2009-11-12 06:07:06

orschiro
Member
Registered: 2009-06-04
Posts: 2,136
Website

[netcfg] automatic reconnect

Hello guys,

is there a way to let netcfg automatically reconnect to a specific profile after the signal level had dropped under a user-defined limit?

In short; netcfg should execute the following two commands, when the signal rate is very low:

netcfg down profile
netcfg profile

Thank you for your answers. .)

Offline

#2 2009-11-12 06:48:51

ngoonee
Forum Fellow
From: Between Thailand and Singapore
Registered: 2009-03-17
Posts: 7,360

Re: [netcfg] automatic reconnect

You'd probably have to write a simple script to do that, a busy-wait sort of thing (sleep 10 seconds, check, sleep another 10 seconds).


Allan-Volunteer on the (topic being discussed) mailn lists. You never get the people who matters attention on the forums.
jasonwryan-Installing Arch is a measure of your literacy. Maintaining Arch is a measure of your diligence. Contributing to Arch is a measure of your competence.
Griemak-Bleeding edge, not bleeding flat. Edge denotes falls will occur from time to time. Bring your own parachute.

Offline

#3 2010-03-09 22:23:23

Moo-Crumpus
Member
From: Hessen / Germany
Registered: 2003-12-01
Posts: 1,489

Re: [netcfg] automatic reconnect

networkmanager does reconnections if the connection is lost, netcfg not. I doubt I would engage in writing a script in somewhat another tool does out of the box.


Frumpus addict
[mu'.krum.pus], [frum.pus]

Offline

#4 2010-03-11 16:51:27

Moo-Crumpus
Member
From: Hessen / Germany
Registered: 2003-12-01
Posts: 1,489

Re: [netcfg] automatic reconnect

You could add a cronjob for something like (IP-Adress could be a switch or gateway in your homenetwork, or some url outside - ping www.google.com, f.e.)
but you would have to add netcfg -r PROFILENAME to /etc/sudoers.

#!/bin/bash
if ping -c 1 -w 1 -q 192.168.254.255 &>/dev/null; then
    echo ""&>/dev/null
else
    sudo /usr/bin/netcfg -r PROFILENAME 
 fi

Sorry for not having a better idea.

Last edited by Moo-Crumpus (2010-03-11 16:53:19)


Frumpus addict
[mu'.krum.pus], [frum.pus]

Offline

Board footer

Powered by FluxBB