From mboxrd@z Thu Jan  1 00:00:00 1970
Received: from pigeon.gentoo.org ([208.92.234.80] helo=lists.gentoo.org)
	by finch.gentoo.org with esmtp (Exim 4.60)
	(envelope-from <gentoo-user+bounces-129895-garchives=archives.gentoo.org@lists.gentoo.org>)
	id 1RFmVy-0002pW-F4
	for garchives@archives.gentoo.org; Mon, 17 Oct 2011 12:41:58 +0000
Received: from pigeon.gentoo.org (localhost [127.0.0.1])
	by pigeon.gentoo.org (Postfix) with SMTP id 5199F21C09F;
	Mon, 17 Oct 2011 12:41:37 +0000 (UTC)
Received: from out5.smtp.messagingengine.com (out5.smtp.messagingengine.com [66.111.4.29])
	by pigeon.gentoo.org (Postfix) with ESMTP id 9CA2E21C021
	for <gentoo-user@lists.gentoo.org>; Mon, 17 Oct 2011 12:39:51 +0000 (UTC)
Received: from compute4.internal (compute4.nyi.mail.srv.osa [10.202.2.44])
	by gateway1.nyi.mail.srv.osa (Postfix) with ESMTP id 417A120798
	for <gentoo-user@lists.gentoo.org>; Mon, 17 Oct 2011 08:39:51 -0400 (EDT)
Received: from frontend1.nyi.mail.srv.osa ([10.202.2.160])
  by compute4.internal (MEProxy); Mon, 17 Oct 2011 08:39:51 -0400
DKIM-Signature: v=1; a=rsa-sha1; c=relaxed/relaxed; d=binarywings.net;
	 h=message-id:date:from:mime-version:to:subject:references
	:in-reply-to:content-type; s=mesmtp; bh=oHsdlpAhC9wGqVTmnR+czGjo
	mcc=; b=jSC/rhaPH1JpLoGSzZsccYFucpHVknuIPn18rmz/bxhS0BTHB3caRYvC
	vXbs8BG4w/5SgCyfapRbl8AHqsetjAQIfP4FuGM4bH514T/+PsDQqmDZTa0K2RPg
	SLw+S1fF7vx1+mTS15OCW1dbJR3rBwbRp+G1/PbaDGPW8TNrQbw=
DKIM-Signature: v=1; a=rsa-sha1; c=relaxed/relaxed; d=
	messagingengine.com; h=message-id:date:from:mime-version:to
	:subject:references:in-reply-to:content-type; s=smtpout; bh=oHsd
	lpAhC9wGqVTmnR+czGjomcc=; b=PM94OPyUjko91nwiIwwPKjxOVvzQ2A7tZjUK
	dqS++7dJVBvF1OEPqOxdb0QoPTNnQ/1QRpxgkp5sgD9kRQs/CDqi166oiitknL/C
	h7Le9fRdbmlBSk5ZunX8ShQxdOU7xafA2FUJxGz6Ry/RJ1uFuDthwXnsZ+JO1alG
	+hqcsfM=
X-Sasl-enc: RlxkXol0mMvx4bgYfq6xhlO7rumaeFsLt728rF8xB0g1 1318855190
Received: from [192.168.5.18] (serv.binarywings.net [83.169.5.6])
	by mail.messagingengine.com (Postfix) with ESMTPSA id E7FC9406310
	for <gentoo-user@lists.gentoo.org>; Mon, 17 Oct 2011 08:39:49 -0400 (EDT)
Message-ID: <4E9C220C.7090101@binarywings.net>
Date: Mon, 17 Oct 2011 14:39:40 +0200
From: Florian Philipp <lists@binarywings.net>
User-Agent: Mozilla/5.0 (X11; U; Linux x86_64; en-US; rv:1.9.2.20) Gecko/20110925 Lightning/1.0b3pre Thunderbird/3.1.12
Precedence: bulk
List-Post: <mailto:gentoo-user@lists.gentoo.org>
List-Help: <mailto:gentoo-user+help@lists.gentoo.org>
List-Unsubscribe: <mailto:gentoo-user+unsubscribe@lists.gentoo.org>
List-Subscribe: <mailto:gentoo-user+subscribe@lists.gentoo.org>
List-Id: Gentoo Linux mail <gentoo-user.gentoo.org>
X-BeenThere: gentoo-user@lists.gentoo.org
Reply-to: gentoo-user@lists.gentoo.org
MIME-Version: 1.0
To: gentoo-user@lists.gentoo.org
Subject: Re: [gentoo-user] Another Install Issue
References: <4E9A119D.1000501@gmail.com>	<4E9AAC83.3050305@binarywings.net>	<201110161118.45443.michaelkintzios@gmail.com>	<4E9B5C37.7060501@binarywings.net>	<20111017091500.5e600736@zaphod.digimed.co.uk>	<CAGOe-ewqTt+mEBg3WrRJsd9v+6aaMv-5u6AuKNk=QYxenLgaZg@mail.gmail.com> <20111017123015.6feec5cc@zaphod.digimed.co.uk>
In-Reply-To: <20111017123015.6feec5cc@zaphod.digimed.co.uk>
X-Enigmail-Version: 1.1.2
Content-Type: multipart/signed; micalg=pgp-sha1;
 protocol="application/pgp-signature";
 boundary="------------enig03FC0D83575D6A7F61135A4A"
X-Archives-Salt: 
X-Archives-Hash: 6e6dac409f597b5e4f27846e1b5eb3b5

This is an OpenPGP/MIME signed message (RFC 2440 and 3156)
--------------enig03FC0D83575D6A7F61135A4A
Content-Type: text/plain; charset=ISO-8859-1
Content-Transfer-Encoding: quoted-printable

Am 17.10.2011 13:30, schrieb Neil Bothwick:
> On Mon, 17 Oct 2011 12:19:16 +0100, Mick wrote:
>=20
>>> This seems more elegant than a separate init script, but do you want
>>> it to return 0 unconditionally? If the modules fail to load, surely
>>> you want the attempt to bring the interface up to abort? =20
>>
>> In my head I find it less elegant to be honest.  Is it up to a network=

>> configuration script to load the *kernel* module for the hardware?
>=20
> Is it up to an init script to do that either? I'd say no. either way
> seems wrong, but having the network config check that the interface is
> available before trying to bring it up seems somewhat less wrong.
>=20
>=20

Yes, I intended it to return 0 unconditionally. My reasoning was that
a) trying anyway doesn't hurt.
b) when you change your kernel config or hardware and don't need that
workaround anymore, it is better to have a working network and a warning
rather than no network and an error.
c) for something that is potentially important for the user to get
access to the system, you should try as hard as possible to get it
running before giving up. Of course, this is more important for a
headless server than a desktop but scripts tend to get copied around.

Concerning what is more elegant: no clue. I guess you could even use
udev for this stuff but I don't know the syntax.

One thing that I worry more about is that there might be a race
condition. Maybe after loading the module, some time is necessary for
the interface to appear. I ran into an issue like that while playing
around with the zram module. In such a case, the separate init script
has a higher chance to succeed than a bash function called some
milliseconds before the interface initialization.

Regards,
Florian Philipp


--------------enig03FC0D83575D6A7F61135A4A
Content-Type: application/pgp-signature; name="signature.asc"
Content-Description: OpenPGP digital signature
Content-Disposition: attachment; filename="signature.asc"

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v2.0.17 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/

iEYEARECAAYFAk6cIhEACgkQqs4uOUlOuU+AKACdEAD5ys7ZCSuJieHkISGW+/Zh
k3gAn0PUPts7pym+GxR1i+jet0ptua7q
=wbVg
-----END PGP SIGNATURE-----

--------------enig03FC0D83575D6A7F61135A4A--