From owner-freebsd-current@FreeBSD.ORG Sun Feb 23 08:33:06 2014 Return-Path: Delivered-To: freebsd-current@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 2447ACEA for ; Sun, 23 Feb 2014 08:33:06 +0000 (UTC) Received: from mail-oa0-x229.google.com (mail-oa0-x229.google.com [IPv6:2607:f8b0:4003:c02::229]) (using TLSv1 with cipher ECDHE-RSA-RC4-SHA (128/128 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id DEC59164F for ; Sun, 23 Feb 2014 08:33:05 +0000 (UTC) Received: by mail-oa0-f41.google.com with SMTP id o6so5873540oag.0 for ; Sun, 23 Feb 2014 00:33:05 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :cc:content-type; bh=pUZpozNUP4KcOcU+q2sOH7QnGgJwvLOSUXEHt0rWqfU=; b=E1taCxAFsarV7uJnlJ4AunDLIKrFeTniXPDm7H048P/6ofcylzrFjKUWXME3XTjxk0 UGFnMmhTwc1kS/KE3HKZRp2kzXaLevAIOV6FwTZQTobE0zOoGxwNyKubx26Y1NCjXOMZ 0K/1f9+ahDFyc4joB7AjOdigGdPJ7d5eW73dhmy+X0xOhIdsiD3kVZpV+JcU+cujZWCt 2l5pDpHdIoxOa9ZhgLpPicj/JG44rYA2LB/11vf0d4o301wLeTIbGK/k1xE7ZcbA3PsB kNmgI5vBND2ExVpWMhDgREnw9OCJ/5QTC1n9lWqw7XjSdZltU3zmsTBeB2pow9y7spXk a53w== MIME-Version: 1.0 X-Received: by 10.182.2.170 with SMTP id 10mr12565808obv.50.1393144385196; Sun, 23 Feb 2014 00:33:05 -0800 (PST) Received: by 10.76.144.10 with HTTP; Sun, 23 Feb 2014 00:33:05 -0800 (PST) In-Reply-To: References: Date: Sun, 23 Feb 2014 09:33:05 +0100 Message-ID: Subject: Re: libinit idea From: Andreas Nilsson To: Scot Hetzel Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable X-Content-Filtered-By: Mailman/MimeDel 2.1.17 Cc: =?ISO-8859-1?Q?Bruno_Lauz=E9?= , "freebsd-current@freebsd.org" X-BeenThere: freebsd-current@freebsd.org X-Mailman-Version: 2.1.17 Precedence: list List-Id: Discussions about the use of FreeBSD-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 23 Feb 2014 08:33:06 -0000 On Sun, Feb 23, 2014 at 8:46 AM, Scot Hetzel wrote: > On Sat, Feb 22, 2014 at 5:54 PM, Bruno Lauz=E9 wrote= : > > https://github.com/brunolauze/libnit > > > > I know there's really big debate about init system but here's my > tentative to propose a new model to replace rc. > > > > Let's call it libinit but the name as no significance for now. > > > > I started coding a library with the following architecture. > > > > the main idea is to rewrite rc in C language. > To me this seems like much work for no real gain. And it would make it that much harder to debug a misbehaving "script", in more than one way: * c is a lot longer than sh, ie sh expresses the logic that much more clearly. * to actually see the new "script" would require to have the source code installed, something far from everybody has. > > > > a utility called system would act a little bit like service command doe= s. > > > > a folder would contains libraries instead of scripts inside > [target]/etc/rc.d > > so we can add as many librairies a user desire and interlink the order > of each piece among all like in rc. > > > libraries don't belong in [target]/etc/rc.d, they would have to be in > {/usr,}/lib{exec,}/rc.d or ${PREFIX}/lib{exec,}/rc.d > > Imho, the replacement to init and rc-scripts I sometimes think about woul= d be to import SMF from opensolaris/illumos. There one can at least get the commands run and config used without looking at the source code. Best regards Andreas