Debian Developers - Ifupdown 'extra' package with network ({pre,post}) testing scripts

This is Interesting: Free IT Magazines  
Home > Archive > Debian Developers > November 2006 > Ifupdown 'extra' package with network ({pre,post}) testing scripts





You are viewing an archived Text-only version of the thread. To view this thread in it's original format and/or if you want to reply to this thread please [click here]

Author Ifupdown 'extra' package with network ({pre,post}) testing scripts
Javier Fernández-Sanguino Peña

2006-08-15, 1:26 pm

Emanuele Rocca

2006-08-16, 1:26 pm

Hello Javier,

* Javier Fernández-Sanguino Peña <jfs@computer.org>, [2006-08-15 19:41 +0200]:
> I have written and collected some network testing scripts in a new
> 'ifupdown-extra' package which is right now available in
> http://people.debian.org/~jfs/ifupdown-extra
>
> This package provides additional scripts for ifupdown to test for some common
> problems when setting up interfaces:
>
> - interfaces without a link (admin can have that condition abort interface
> setup if he wants the behaviour described in #120382)


Very nice.
The test could be added to ping-places.sh (provided by ifupdown as an
example), otherwise mapping stanzas using it to choose a logical
interface will try to ping addresses using an interface which may be
down.

What about putting the code which checks the link status in a separate
script, so that it can be used elsewhere?

> This package also provides 'network-test', a script to test the network
> configuration status by checking:
> - Interface status


This feature is not working properly here.

On line 229 you do a "echo $status | grep UP\>". When status contains
something like "1: lo: <LOOPBACK,UP,10000> mtu 16436 qdisc noqueue" it
fails.
I guess you may just grep for "UP".

Thanks for the package!
ciao,
ema

Javier Fernández-Sanguino Peña

2006-08-16, 7:22 pm

On Wed, Aug 16, 2006 at 02:36:52PM +0200, Emanuele Rocca wrote:
> Hello Javier,


Hi there.

>
> Very nice.
> The test could be added to ping-places.sh (provided by ifupdown as an
> example), otherwise mapping stanzas using it to choose a logical
> interface will try to ping addresses using an interface which may be
> down.


Could do.

> What about putting the code which checks the link status in a separate
> script, so that it can be used elsewhere?


It's pretty standalone right now. You just have to run it as root as this:

# IFACE=eth0 /etc/network/if-pre-up.d/check-network-cable

The meat is, however, in the check_status() functions so they could move
elsewhere and create a script that used $1 instead.

>
> This feature is not working properly here.


Yep, sorry, the network-cable test in that one is still flacky, it should
reuse the code in the 'check-network-cable' script (i.e. use 'ip link show'
and look for NO-CARRIER, or use mii-tool or ethtool). I've fixed and made
available a new version up at people.debian.org (package version 0.2 now)

Regard

Javier

Javier Fernández-Sanguino Peña

2006-11-27, 7:25 pm

On Tue, Aug 15, 2006 at 07:41:54PM +0200, Javier Fernández-Sanguino Peña wrote:
>
> I have written and collected some network testing scripts in a new
> 'ifupdown-extra' package which is right now available in
> http://people.debian.org/~jfs/ifupdown-extra
>
> This package provides additional scripts for ifupdown to test for some common
> problems when setting up interfaces:

(...)

I wrote this email a long time ago and I've finally decided to make this
package available at 'experimental'. The latest releases even fixes some bugs
(:-O). I would really appreciate other's testing the network-test script as
well as the other scripts provided (which run when an interface is ifup'd)

If anyone (beside Loïc Minier, which already offered some scripts of the
'vlan' packag) wants to move over network-related scripts to ifupdown-extra
to make them available post-etch [1] please contact me (or file a bug
report).

'Network-test' [2] could, of course, be rewritten into a more user-friendly
application (and even provide a {G,}UI) instead of being an ugly text-only
undecipherable application. If somebody feels like rewriting it in PERL or
Python by all means, do so!

Regards

Javier

[1] I will not put it into stable until then
[2] No project page at Alioth yet, if there's enough interest I'll put it all
up in a repo there.

Sponsored Links






Free braindumps | Software forum | Database administration forum

Copyright 2003 - 2008 webservertalk.com