Bug#374326: idea: limiting configuration to interfaces

2007-11-14 Thread martin f krafft
also sprach Enrico Zini [EMAIL PROTECTED] [2007.11.04.1404 +0100]:
   map !disconnected

I guess this is as good as it'll get. Possibly actually better than
my initial thought. Thanks,

-- 
 .''`.   martin f. krafft [EMAIL PROTECTED]
: :'  :  proud Debian developer, author, administrator, and user
`. `'`   http://people.debian.org/~madduck - http://debiansystem.info
  `-  Debian - when you have better things to do than fixing systems


digital_signature_gpg.asc
Description: Digital signature (see http://martin-krafft.net/gpg/)


Bug#374326: idea: limiting configuration to interfaces

2007-11-04 Thread Enrico Zini
On Fri, Sep 15, 2006 at 11:10:01AM +0200, martin f krafft wrote:

 Here's a reason whyI want this feature:
[...]
 Now I want to be able to say that the disconnected test does not
 apply to the wifi $IFACE. I can thus limit the wifi mapping to the
 other tests (as you suggest), but then every time I add a new
 location, I must also add it to the limit or else stuff will not
 work.

While reorganising the code I noticed that there was a feature I forgot
about:

map !disconnected

Which would enable all mappings except 'disconnected'.  This seems to
solve your case... I wish I found that out earlier.


Ciao,

Enrico

-- 
GPG key: 1024D/797EBFAB 2000-12-05 Enrico Zini [EMAIL PROTECTED]


signature.asc
Description: Digital signature


Bug#374326: idea: limiting configuration to interfaces

2006-09-15 Thread martin f krafft
also sprach Enrico Zini [EMAIL PROTECTED] [2006.08.25.2355 +0200]:
 The way I understand ifupdown to work is to provide configuration
 stanzas that don't know about the actual names of the physical
 interfaces, and mapping stanza that define the mapping.  So I'll
 limit myself to that.

Here's a reason whyI want this feature:

I am using

  iface disconnected inet manual
test missing-cable
pre-up false

The pre-up false causes the interface *not* to be configured.

However, my wireless card does not support any of the link detection
mechanisms, and due to #336924, it will always be brought up
disconnected:

lapse:~# ifup wifi
Link beat detection (mii) failed: Operation not supported
Link beat detection (ethtool) failed: Operation not supported
Failed to bring up disconnected.

Now I want to be able to say that the disconnected test does not
apply to the wifi $IFACE. I can thus limit the wifi mapping to the
other tests (as you suggest), but then every time I add a new
location, I must also add it to the limit or else stuff will not
work.

Instead, it would be nice to be able to say: this iface stanza does
not apply to the wifi interface right in the stanza.

Remembering that you said that guessnet works by favourising stanzas
for which multiple commands succeed, I tried to add

  test command [ $IFACE != wifi ]

but ifupdown does not like that:

lapse:~# ifup wifi
/etc/network/interfaces:25: duplicate option
ifup: couldn't read interfaces file /etc/network/interfaces

-- 
 .''`. martin f. krafft [EMAIL PROTECTED]
: :'  :proud Debian developer, author, administrator, and user
`. `'` http://people.debian.org/~madduck http://debiansystem.info
  `-  Debian - when you have better things to do than fixing systems


signature.asc
Description: Digital signature (GPG/PGP)


Bug#374326: idea: limiting configuration to interfaces

2006-09-15 Thread Enrico Zini
On Fri, Sep 15, 2006 at 11:10:01AM +0200, martin f krafft wrote:

 Remembering that you said that guessnet works by favourising stanzas
 for which multiple commands succeed, I tried to add
   test command [ $IFACE != wifi ]
 but ifupdown does not like that:
 lapse:~# ifup wifi
 /etc/network/interfaces:25: duplicate option
 ifup: couldn't read interfaces file /etc/network/interfaces

You've hit the ifupdown limitation over which I've been fight with aj
quite a bit long time ago: ifupdown doesn't allow two lines in a stanza
to start with the same word.

This is buried deep in the manpage and admittedly not very hard to find:

  ifupdown does not allow two option lines in /etc/network/interfaces to
  start with the same word.  To work  around  this  limitation, multiple
  test (or guessnet) lines can have different numerals suffixed to their
  initial keywords (test1, test2, or guessnet1, guessnet2, and so on).


Ciao,

Enrico

-- 
GPG key: 1024D/797EBFAB 2000-12-05 Enrico Zini [EMAIL PROTECTED]


signature.asc
Description: Digital signature


Bug#374326: idea: limiting configuration to interfaces

2006-08-26 Thread Adeodato Simó
reopen 374326
tag 374326 wontfix
thanks

* Enrico Zini [Fri, 25 Aug 2006 22:55:51 +0100]:

 However, please feel free to reopen the bug.  I'll tag it wontfix, but
 I'll be happy to apply a patch that closes it if someone provides it.

I would like this. Both the feature and the bug to stay open, if you
don't mind. :-)

Cheers, 

-- 
Adeodato Simó dato at net.com.org.es
Debian Developer  adeodato at debian.org
 
  Listening to: Los Piratas - Fecha caducada




Bug#374326: idea: limiting configuration to interfaces

2006-08-25 Thread Enrico Zini
On Sun, Jun 18, 2006 at 05:41:27PM +0200, martin f krafft wrote:

 If it's not too much trouble, maybe we could implement a limit-to
 keyword, which takes interface names as arguments. Then, when
 guessnet runs, it only runs tests without limits or where the limit
 set includes the interface to be configured.
 This would be handy primarily for the no-cable test, which makes no
 sense on wireless interfaces, PPP, TUN, etc. interfaces.
 Maybe a skip-for keyword would be trivial to add as well.

Hello Martin,

Thanks for the report.

This is something you can do by limiting the candidate profiles for an
interface in the mapping stanza.

The following example runs the ``no-cable`` test only on the ethernet
interface::

  mapping eth0
script /usr/sbin/guessnet-ifupdown
map default: auto
map no-cable home work
  
  mapping wlan0
script /usr/sbin/guessnet-ifupdown
map default: auto
map home work hotel

It's a good question, though: I'm adding this to the FAQ.


Ciao,

Enrico

-- 
GPG key: 1024D/797EBFAB 2000-12-05 Enrico Zini [EMAIL PROTECTED]


signature.asc
Description: Digital signature


Bug#374326: idea: limiting configuration to interfaces

2006-08-25 Thread martin f krafft
also sprach Enrico Zini [EMAIL PROTECTED] [2006.08.25.1524 +0100]:
 This is something you can do by limiting the candidate profiles for an
 interface in the mapping stanza.

No, that's the wrong way around. :)

I know I can use limits in the mapping stanza, but i really would
like to be able to limit a configuration to an interface/mapping
name. It just seems more logical...

-- 
 .''`. martin f. krafft [EMAIL PROTECTED]
: :'  :proud Debian developer, author, administrator, and user
`. `'` http://people.debian.org/~madduck http://debiansystem.info
  `-  Debian - when you have better things to do than fixing systems


signature.asc
Description: Digital signature (GPG/PGP)


Bug#374326: idea: limiting configuration to interfaces

2006-08-25 Thread Enrico Zini
On Fri, Aug 25, 2006 at 10:32:11PM +0100, martin f krafft wrote:
 also sprach Enrico Zini [EMAIL PROTECTED] [2006.08.25.1524 +0100]:
  This is something you can do by limiting the candidate profiles for an
  interface in the mapping stanza.
 No, that's the wrong way around. :)
 I know I can use limits in the mapping stanza, but i really would
 like to be able to limit a configuration to an interface/mapping
 name. It just seems more logical...

The way I understand ifupdown to work is to provide configuration
stanzas that don't know about the actual names of the physical
interfaces, and mapping stanza that define the mapping.  So I'll limit
myself to that.

However, please feel free to reopen the bug.  I'll tag it wontfix, but
I'll be happy to apply a patch that closes it if someone provides it.


Ciao,

Enrico

-- 
GPG key: 1024D/797EBFAB 2000-12-05 Enrico Zini [EMAIL PROTECTED]


signature.asc
Description: Digital signature


Bug#374326: idea: limiting configuration to interfaces

2006-06-18 Thread martin f krafft
Package: guessnet
Version: 0.38-1.1
Severity: wishlist

If it's not too much trouble, maybe we could implement a limit-to
keyword, which takes interface names as arguments. Then, when
guessnet runs, it only runs tests without limits or where the limit
set includes the interface to be configured.

This would be handy primarily for the no-cable test, which makes no
sense on wireless interfaces, PPP, TUN, etc. interfaces.

Maybe a skip-for keyword would be trivial to add as well.

-- 
Please do not send copies of list mail to me; I read the list!
 
 .''`. martin f. krafft [EMAIL PROTECTED]
: :'  :proud Debian developer and author: http://debiansystem.info
`. `'`
  `-  Debian - when you have better things to do than fixing a system


signature.asc
Description: Digital signature (GPG/PGP)