From owner-freebsd-hackers@FreeBSD.ORG Thu Jun 21 16:15:19 2012 Return-Path: Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 4E6D6106566B for ; Thu, 21 Jun 2012 16:15:19 +0000 (UTC) (envelope-from jhellenthal@dataix.net) Received: from mail-yx0-f182.google.com (mail-yx0-f182.google.com [209.85.213.182]) by mx1.freebsd.org (Postfix) with ESMTP id DE3C48FC12 for ; Thu, 21 Jun 2012 16:15:18 +0000 (UTC) Received: by yenl8 with SMTP id l8so750417yen.13 for ; Thu, 21 Jun 2012 09:15:18 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=dataix.net; s=rsa; h=date:from:to:cc:subject:message-id:references:mime-version :content-type:content-disposition:in-reply-to; bh=SJeR7hZwjyNsrBNx9P2gGYi9pXHlwhugS6Tg4E5ZWBg=; b=UMuAU7ohLwF15WLvP5xbAeBKp7cE2Avz2+YFcxs6bsEXPRMr7I2B573avLD3yT8A9I eLVEzAFUrxGXySgWwTbkeHWpif1VE6MzKGL6fjJ1DDAM+KQoXxlERCDJ8SM0MOc60wE2 oWVGYd/I3l55yg5TJOU2+IW/HlhVtHEg0VTb0= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20120113; h=date:from:to:cc:subject:message-id:references:mime-version :content-type:content-disposition:in-reply-to:x-gm-message-state; bh=SJeR7hZwjyNsrBNx9P2gGYi9pXHlwhugS6Tg4E5ZWBg=; b=ZXW+Okzi2fYG9juknmJ0ugq9RwMDWD62bl9UfMyO1avpywloKcgkTmY1CylT3+Z4T0 eLC3fIlumrJvxnin6wX0daLfarW0lBPiwGnnKKbYhpOC7A0Wx7NSrsTqWfWqJ1ONJiNT QSB39o6skUNy+ahsd9hPfGdXr9rSVEbM3LIBS4VSCTlKh62efNOhbmHwv4hiUZ4YBU+e 5ybMgxnTfckLQ5zCn/IZd7syZub0ICwdwLfQqjRtKS/dAytgpGfEH+y6uF8J2XjHykvU CZ3BlcI1oGB442gjNFcvp6JctJ3qXc6iCqWV1Z6FP7HVpI9to6giR2u5Ih56MGLhVVOS ZzRA== Received: by 10.50.179.72 with SMTP id de8mr8172589igc.23.1340295318177; Thu, 21 Jun 2012 09:15:18 -0700 (PDT) Received: from DataIX.net (75-128-120-86.dhcp.aldl.mi.charter.com. [75.128.120.86]) by mx.google.com with ESMTPS id dc7sm18213463igc.13.2012.06.21.09.15.17 (version=TLSv1/SSLv3 cipher=OTHER); Thu, 21 Jun 2012 09:15:17 -0700 (PDT) Received: from DataIX.net (localhost [127.0.0.1]) by DataIX.net (8.14.5/8.14.5) with ESMTP id q5LGFFmZ094084 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Thu, 21 Jun 2012 12:15:15 -0400 (EDT) (envelope-from jhellenthal@DataIX.net) Received: (from jh@localhost) by DataIX.net (8.14.5/8.14.5/Submit) id q5LGFErc094083; Thu, 21 Jun 2012 12:15:14 -0400 (EDT) (envelope-from jhellenthal@DataIX.net) Date: Thu, 21 Jun 2012 12:15:13 -0400 From: Jason Hellenthal To: Wojciech Puchar Message-ID: <20120621161513.GA88762@DataIX.net> References: <4FE0C123.8030301@gentoo.org> <4FE0F773.1080403@gentoo.org> <4FE100F9.2050009@funtoo.org> <20120620073920.GA5300@lonesome.com> <20120620214006.GA1651@aspire.rulingia.com> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="oyUTqETQ0mS9luUI" Content-Disposition: inline In-Reply-To: X-Gm-Message-State: ALoCoQnaiNuBfcL45M4ULkpKsaiDxbduCgXDUcs7yJPuSPoxMizkIMdUFTri4ZNbTAiKaE2ZLfAQ Cc: "freebsd-hackers@freebsd.org" , openrc@gentoo.org Subject: Re: Replacing rc(8) (Was: FreeBSD Boot Times) X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 21 Jun 2012 16:15:19 -0000 --oyUTqETQ0mS9luUI Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Thu, Jun 21, 2012 at 12:22:08PM +0200, Wojciech Puchar wrote: > Lets make a summary. >=20 > What functionality would be good to have in FreeBSD that doesn't exist: >=20 > 1) "runlevels" with arbitrary names. runlevel change would start and stop= =20 > right services. > 2) exploit startup parallelism. >=20 >=20 > What we do not want to change: >=20 > - file structure which is simple. one file in rc.d/ per service and one= =20 > global config file (rc.conf) > - anything else that would make things more complicated. >=20 >=20 > As for >=20 > 1) i propose in rc.conf an option to put "NO", "YES" (or ALL) or runlevel= =20 > list for each service or runlevel exclusion list for service. >=20 >=20 > examples: >=20 > service1_enable=3D"YES" > service2_enable=3D"NO" > service3_enable=3D"foolevel maintenance" > service4_enable=3D"YES -foolevel" (or ALL -funkyrunlevel) >=20 > name of default runlevel may be "full" or "multiuser" >=20 > service 1 will always work, service 2 never, service 3 only at runlevels= =20 > "foolevel" and "maintenance", service4 with any runlevel except=20 > "foolevel". >=20 > still single rc.conf, not much bigger in practice. >=20 > 2) no change in rc.d/* scripts and rc.conf, but change in scripts. >=20 >=20 > If everyone agree i think i may write this new scripts. Sorry but I completely disagree here. Why ? Because do one thing and do one thing well. What do you mean ? service_enable=3D"YES" - enables the service ... IT IS NOT TO ALSO ADD MORE CRAP TO. Try something like the following... service_runlevels=3D"1 2 3 4 5" And provide a way to say... allservice_runlevels=3D"3 4 5" which would basically state that every service runs under runlevel 3,4,5 unless specifically stated. Lets not bastardize this overly simple process by modifying already existing variables. Add a framework to coexist and teach rc to respect and comply with it. current rc scripts would not have to be modified if done correctly as well. You can short circuit the _enable=3D vars early on by just inspecting its _runlevel=3D var... Same thing could be had for a service profile script. nothing in etc/rc.d/ would have to be modified. --=20 - (2^(N-1)) --oyUTqETQ0mS9luUI Content-Type: application/pgp-signature -----BEGIN PGP SIGNATURE----- iQEcBAEBAgAGBQJP40iRAAoJEBSh2Dr1DU7WZZwH/3M+IMVRyWL7iFKjm7V2MONg HHOzUfLfbVZQB0UIkUJTKeIm7CKAcQjMVXosbu8x22fYwVRBOKPOdfWy2UbQvipx Gz38AYiUAt3n9Yr2smPP6+17DL+PHeqXiUaFkohBa3RoPdFVzyvO1HpB84MGKufm LtA8awDzULSbDWB/44UpYR3uCdT0wPkkfhzkE1AiEwVijydAEkv/R+ZJH4mal37a 1fH2DoHfApTq5BICi4K7Ko3HE17TobnqKPN9WcUdBgY/mdvMPCP8Qblywqb2V2Nt rlHebCRT6Tm+NWC/x/kLj/fQvyXu2/faslurEWrKL1sFsTKq7DnCp2fIO++I1ig= =n1YJ -----END PGP SIGNATURE----- --oyUTqETQ0mS9luUI--