[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: Back to technical discussion? Yes! (was: network-manager as default? No!)



Hi,

On 2011-04-05 20:37:39 +0300, Andrew O. Shadoura wrote:
> Hello,
> 
> On Tue, 5 Apr 2011 14:31:40 +0200
> Vincent Lefevre <vincent@vinc17.net> wrote:
> 
> > [About the general problem of documentation]
> > The problem is to find the correct tools and the correct
> > documentation. For instance, imagine the average user who wants for
> > Ethernet (eth0), to do the following automatically (for a laptop):
> >   1. use some fixed IP address if there's some peer 192.168.0.1
> >      with some given MAC address;
> >   2. otherwise, if an Ethernet cable is plugged in (and only in this
> >      case), start a DHCP client;
> >   3. make things still work after a suspend/resume.
> > I now know how to do this. But I still wonder what documentation a
> > user should read to achieve such a configuration. It is normal that a
> > user may want to use his laptop from network to network and things
> > work without manual reconfiguration.
> 
> Of course, man guessnet. Just few lines.

First, my remark was more about: how does the user find that he needs
guessnet in the first place (and not some other tool)? One often find
tools via references from man pages or package descriptions, but this
doesn't seem to be the case here.

Moreover, guessnet is sufficient for (1), but not for (2) and (3)
(this part is covered below).

> mapping eth1
> 	script guessnet-ifupdown
> 	map default: dhcp
> 
> iface eth-home inet static
> 	test peer address 192.168.0.1 mac ...
> 	...
> 
> iface dhcp inet dhcp

That's not sufficient, because if a DHCP client is still running (e.g.
because the previous configuration used DHCP), one needs to kill it
before using a fixed IP address (in eth-home).

My solution is to use a wrapper to guessnet that does this job.

> The last requirement is fulfilled by means of installing ifplugd.

Well, ifplugd didn't work for me. I don't know what the real causes
were. There was at least a $PATH problem, because contrary to ifupdown,
the ifplugd init script doesn't include /usr/local/sbin in $PATH (and
the error message was not logged). There are still open bugs that
could be related to my problems with it.

I'm using netplug instead, but again, there's a bug with the default
configuration (and it seems that ifplugd is affected by this too).
See:

  http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=619866

I now use a workaround, but to find the cause of the problem, I had
to do a strace in a /etc/init.d script, in particular causing the
machine to be sometimes unbootable.

Really, this is not what an end user should do.

-- 
Vincent Lefèvre <vincent@vinc17.net> - Web: <http://www.vinc17.net/>
100% accessible validated (X)HTML - Blog: <http://www.vinc17.net/blog/>
Work: CR INRIA - computer arithmetic / Arénaire project (LIP, ENS-Lyon)


Reply to: