From owner-freebsd-current@FreeBSD.ORG Mon Feb 24 13:31:34 2014 Return-Path: Delivered-To: freebsd-current@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 96913E9A for ; Mon, 24 Feb 2014 13:31:34 +0000 (UTC) Received: from theravensnest.org (theraven.freebsd.your.org [216.14.102.27]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 5E914164C for ; Mon, 24 Feb 2014 13:31:33 +0000 (UTC) Received: from dhcp-172-17-159-181.eduroam.lapwing.private.cam.ac.uk (global-1-26.nat.csx.cam.ac.uk [131.111.184.26]) (authenticated bits=0) by theravensnest.org (8.14.7/8.14.5) with ESMTP id s1ODVKhr054693 (version=TLSv1/SSLv3 cipher=AES128-SHA bits=128 verify=NO); Mon, 24 Feb 2014 13:31:22 GMT (envelope-from theraven@FreeBSD.org) Content-Type: text/plain; charset=iso-8859-1 Mime-Version: 1.0 (Mac OS X Mail 7.1 \(1827\)) Subject: Re: libinit idea From: David Chisnall In-Reply-To: Date: Mon, 24 Feb 2014 13:31:15 +0000 Content-Transfer-Encoding: quoted-printable Message-Id: <199FFBA6-DBE0-4533-95BE-F23346239F11@FreeBSD.org> References: <20140223182232.GA25967@lucius.XxX> <530A4D0A.5000604@bluerosetech.com> To: Matthias Gamsjager X-Mailer: Apple Mail (2.1827) Cc: =?iso-8859-1?Q?Bruno_Lauz=E9?= , "freebsd-current@freebsd.org" , Darren Pilgrim 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: Mon, 24 Feb 2014 13:31:34 -0000 On 24 Feb 2014, at 13:25, Matthias Gamsjager = wrote: > How about delaying the startup of services that are not necessary = right at > the start. For example sshd, samba etc could be loaded after xdm ( or = even > after the DE has loaded). It's a good idea, but it depends on a far more complex system than our = current rc. =20 For example, what happens if you're mounting home directories over SMB? = You need to make sure that XDM doesn't complete the login until samba = has started, which requires automounter / autofs integration with the = init system. You want to speculatively start samba (because you know a = user is going to need it), but in such a way that you can delay = directory lookup resolution until it's actually started. There is a reason most systems are moving away from services started by = a pile of shell scripts: the complex dependencies and event models that = they must handle require some complex generic logic. You can probably = implement this in shell scripts, but it probably won't be fast and it = definitely won't be maintainable. =20 I would be fully in favour of importing a modern, flexible, service = management framework into FreeBSD, but it needs some very careful = design. Launchd, systemd, SMF, and so on all have some good ideas, but = none is quite the right fit for FreeBSD. David