From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from lists.gentoo.org (pigeon.gentoo.org [208.92.234.80]) by finch.gentoo.org (Postfix) with ESMTP id 83EA3138010 for ; Sat, 25 Aug 2012 20:17:39 +0000 (UTC) Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id 2E01321C003; Sat, 25 Aug 2012 20:17:21 +0000 (UTC) Received: from mail-ob0-f181.google.com (mail-ob0-f181.google.com [209.85.214.181]) by pigeon.gentoo.org (Postfix) with ESMTP id C4ECBE0662 for ; Sat, 25 Aug 2012 20:16:31 +0000 (UTC) Received: by obbwd18 with SMTP id wd18so3358632obb.40 for ; Sat, 25 Aug 2012 13:16:31 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=sender:date:from:to:subject:message-id:mail-followup-to:references :mime-version:content-type:content-disposition:in-reply-to :user-agent; bh=DDIcyxVq39J+h6FD/dWr3p8DvfrKEzjLEoWZZTWqkeY=; b=PKNEchX4Cz0hehiQ9yNdMjE81J6Zha/iFas4bX6Wey3SWhbA7tJpzvbwxYxglYEu00 adOXXtJx5KTUqvKyaMTBM1MeLzrDA1TVvlxP8l4n+9LAygGIAyvXFKfY3X0Bhc5OxZwK MLyOPfB1g8HyIjme9BcKuIICpsNGDbKjf10kiAzFV7ot8Yk7CeEwpxfrLJ5leovgqeq8 D+1somsael+JM4njPC17HWeGOennjrMvAtj+6hbSW8AZH4ewSNzX7jfqlAPLJpDOv8Id yKsNbqTmynEe/Unc5LikhpjBwzWNtbqbsCr+JeK7DUpfcEMkXHIn3zJ9ygLQ1dhrH5j9 8mEg== Received: by 10.60.13.201 with SMTP id j9mr6809059oec.51.1345925791228; Sat, 25 Aug 2012 13:16:31 -0700 (PDT) Received: from linux1 (cpe-76-187-95-170.tx.res.rr.com. [76.187.95.170]) by mx.google.com with ESMTPS id ea6sm12725191obc.9.2012.08.25.13.16.29 (version=SSLv3 cipher=OTHER); Sat, 25 Aug 2012 13:16:30 -0700 (PDT) Sender: William Hubbs Received: by linux1 (sSMTP sendmail emulation); Sat, 25 Aug 2012 15:16:28 -0500 Date: Sat, 25 Aug 2012 15:16:28 -0500 From: William Hubbs To: gentoo-dev@lists.gentoo.org Subject: Re: [gentoo-dev] rfc: OpenRC network provides revisited Message-ID: <20120825201628.GA4199@linux1> Mail-Followup-To: gentoo-dev@lists.gentoo.org References: <20120824171010.GA27765@linux1> <86y5l3vrpw.fsf@gentoo.org> <20120824234820.GA1944@linux1> <503828C7.6000607@gentoo.org> <20120825035726.GA2354@linux1> <864nnrv6hf.fsf@gentoo.org> <20120825155314.GA3790@linux1> <50391E43.7000409@gentoo.org> Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: List-Id: Gentoo Linux mail X-BeenThere: gentoo-dev@lists.gentoo.org Reply-to: gentoo-dev@lists.gentoo.org MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="RnlQjJ0d97Da+TV1" Content-Disposition: inline In-Reply-To: <50391E43.7000409@gentoo.org> User-Agent: Mutt/1.5.21 (2010-09-15) X-Archives-Salt: c3f56231-ed39-4354-9f84-ece06d6e9296 X-Archives-Hash: e88741cade4fb004c38c0d0d8899970f --RnlQjJ0d97Da+TV1 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Sat, Aug 25, 2012 at 02:49:39PM -0400, Ian Stakenvicius wrote: > -----BEGIN PGP SIGNED MESSAGE----- > Hash: SHA256 >=20 > On 25/08/12 11:53 AM, William Hubbs wrote: > > On Sat, Aug 25, 2012 at 03:19:24PM +0900, heroxbd@gentoo.org > > wrote: > >> If we set rc_provide=3D"net" in rc.conf, the services that need net > >> can be tricked as we intended to. >=20 > This makes more sense to me as it's in the direction that seems more > logical -- make "net" be provided instantly, rather than forcibly > changing the dependency on each (or all) "net"-using service(s). =20 But your words bring us back to the issue I am considering anyway. I think we should change services that have "need net" in their depends to something like "use net; after net". "use net" tries to start a "net" service if one is in the runlevel and none are already started. Using "after net" makes sure that the service goes down before any net services. That way, if someone removes all net-providing services from their runlevels, services like sshd would still start. Also, if there are net-providing services in the runlevels, it would attempt to start them before sshd. The bottom line here is: I don't think all of the services we have set up to "need net" in their default configuration should be set up that way. It would make OpenRC work out of the box for many more configurations. > rc_modules_provide=3D"net" ? rc_localmount_provide=3D"net" ? There are a > number of required services that could be used to assign "net" to.. =20 rc_[service]_provide=3D"net" imo is the best way to do this if you are putting the variable in rc.conf. That format just says that the one particular service provides net. On the other hand, if you use rc_provide=3D"net" in rc.conf, you are saying that *all* services on your system and any new services you install later provide net. > (And i would think that this specification should occur in rc.conf > rather than a file in /etc/conf.d , simply because it's something (in > the case of NFS root, etc) that's akin to rc_depend_strict or rc_sys > in terms of its impact on the whole openrc configuration) This is really more an idiology thing I guess, but I think if you are tweeking a specific service it should be done in the /etc/conf.d/service file. To follow the example above, to make a particular service provide net, it is better imo to put rc_provide=3D"net" in /etc/conf.d/service. If you want to change this in rc.conf, use the rc_[service]_[depend] variable instead of rc_[depend]. RC_[depend] in rc.conf will apply that dependency to *all* services on your system, including any new ones that get installed later, so be absolutely sure you know what you are doing if you use this. William --RnlQjJ0d97Da+TV1 Content-Type: application/pgp-signature; name="signature.asc" Content-Description: Digital signature -----BEGIN PGP SIGNATURE----- Version: GnuPG v2.0.19 (GNU/Linux) iEYEARECAAYFAlA5MpwACgkQblQW9DDEZThG4gCfQNGX+ioRCOg68kyYD+JYo5Xq mqYAnjd0uqCMhUgam19g/ussMKYwDnz/ =lBit -----END PGP SIGNATURE----- --RnlQjJ0d97Da+TV1--