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 0442459CA3 for ; Sun, 14 Feb 2016 12:11:09 +0000 (UTC) Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id DF0B221C00B; Sun, 14 Feb 2016 12:11:00 +0000 (UTC) Received: from smtp.gentoo.org (smtp.gentoo.org [140.211.166.183]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by pigeon.gentoo.org (Postfix) with ESMTPS id EAF2121C002 for ; Sun, 14 Feb 2016 12:10:59 +0000 (UTC) Received: from [IPv6:2a02:8109:a640:180c:5ee0:c5ff:fe8e:77db] (unknown [IPv6:2a02:8109:a640:180c:5ee0:c5ff:fe8e:77db]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) (Authenticated sender: patrick) by smtp.gentoo.org (Postfix) with ESMTPSA id 705A4340A85 for ; Sun, 14 Feb 2016 12:10:58 +0000 (UTC) Subject: Re: [gentoo-dev] Changing order of default virtual/udev provider To: gentoo-dev@lists.gentoo.org References: <56B85B06.7020500@gentoo.org> <56B936DB.1010407@gentoo.org> <56B939C4.20804@gentoo.org> From: Patrick Lauer X-Enigmail-Draft-Status: N1110 Message-ID: <56C06E9F.7050609@gentoo.org> Date: Sun, 14 Feb 2016 13:10:07 +0100 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:38.0) Gecko/20100101 Thunderbird/38.5.0 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 In-Reply-To: Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-Archives-Salt: 2426dc25-a37a-4a78-99bb-c288872ae265 X-Archives-Hash: a2c398a6fb98f836c4952bdea5911c70 On 02/09/2016 01:17 PM, Rich Freeman wrote: > On Tue, Feb 9, 2016 at 3:43 AM, Kent Fredric wrote: > >> And a lot of Gentoo is surprisingly simple: Like our use of bash >> scripts for recipies to build things, like using rsync to deploy/relay >> not just those recipies, but security notices and news items, which >> are themselves reasonably simple formats. > Well, one thing about Gentoo that certainly isn't simple is our init.d scripts. > > Compare this: > http://pastebin.com/sSDtpF4t More stable link: https://gitweb.gentoo.org/proj/apache.git/tree/2.4/init/apache2.initd > > With this: > http://pastebin.com/Lfn8r7qP More stable link: https://gitweb.gentoo.org/repo/gentoo.git/tree/www-servers/apache/files/apache2.2.service > Systemd does the job in 10% of the code (and half of it is a comment), > and doesn't implement its own service polling and killer script during > shutdown independently for every service (not that every init.d script > even does this - most of them will just leave orphans behind, and > systemd will catch orphans that even the lengthy init.d script for > apache misses). > Right, that's a bad comparison. The equivalent OpenRC init script is: ``` #!/sbin/runscript command="/usr/sbin/apache2" command_args="${APACHE2_OPTS}" description_reload="A graceful restart advises the children to exit after the current request and reloads the configuration." stop() { $command $APACHE2_OPTS -k graceful-stop } reload() { $command $APACHE2_OPTS -k graceful } ``` So that's almost exactly the same (modulo braces and newlines). There's no equivalent for PrivateTmp, and we ignore the extra data in /etc/tmpfiles.d (for creating runtime dirs). Which is bad, but that's another rant ;) Just that the current initscript does a lot more, and ... uhm ... why is the systemd unit sourcing /etc/conf.d/apache2 ? (Oh, and dependencies, but those just slow down startup ) So if you compile the equivalent naive init script there's not much difference, and the initial argument falls on its face and disappears. I'm getting tired of having this argument :)