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 D0B261381F3 for ; Sun, 26 May 2013 10:13:04 +0000 (UTC) Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id 2F6F6E0B8F; Sun, 26 May 2013 10:13:03 +0000 (UTC) Received: from mail-wi0-f172.google.com (mail-wi0-f172.google.com [209.85.212.172]) (using TLSv1 with cipher ECDHE-RSA-RC4-SHA (128/128 bits)) (No client certificate requested) by pigeon.gentoo.org (Postfix) with ESMTPS id 134B3E0B4D for ; Sun, 26 May 2013 10:13:01 +0000 (UTC) Received: by mail-wi0-f172.google.com with SMTP id m6so799303wiv.17 for ; Sun, 26 May 2013 03:13:00 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=date:from:to:cc:subject:message-id:in-reply-to:references:x-mailer :mime-version:content-type:content-transfer-encoding; bh=WamGD956dLWvvnIJlEBG8yQ1HHH2/xCBdw/eTfpzYUg=; b=sg2P3YfRHdJW/uKJqMb5p/+mCY7SFwqN2eVM14yBtWBpOgr4r8gh9uaPJYb4LBuNS3 wi3yz/0+xQdlSgq7mwNj8ftyBTnoCWCg2hmfpW4s8J0TFZNkyg2i7TNbAx6DOMSqFzlm uy4SEPQ6ZbNEiuA9Du6XgB2r5oAYmaKtqcIhZzDq6jv/2TC2UDzc/+uZjg9HX8WRBJkS 74iApRn8PLee8lvwv/aIm34kFuSRIKFUEfXUwul16F+m4n1qkHh9pVy6+NUTzjUcTPUx Zkyno0FHNGQRMiqGgzMETcEdo15ek0PlcyvZfECxozad6mM7NEvHyZ1CZ0ySKjtrsMHK KZSg== X-Received: by 10.194.235.130 with SMTP id um2mr4896901wjc.30.1369563180785; Sun, 26 May 2013 03:13:00 -0700 (PDT) Received: from localhost ([80.92.253.14]) by mx.google.com with ESMTPSA id fv11sm9894845wic.11.2013.05.26.03.13.00 for (version=SSLv3 cipher=RC4-SHA bits=128/128); Sun, 26 May 2013 03:13:00 -0700 (PDT) Date: Sun, 26 May 2013 12:12:49 +0200 From: Robert David To: gentoo-dev@lists.gentoo.org Cc: rich0@gentoo.org Subject: Re: [gentoo-dev] Reusing systemd unit file format / forking systemd (was: Going against co-maintainer's wishes (ref. bug 412697)) Message-ID: <20130526121249.49e00ce7@gmail.com> In-Reply-To: References: <20130526093755.42b62259@gentoo.org> X-Mailer: Claws Mail 3.9.0 (GTK+ 2.24.17; x86_64-pc-linux-gnu) 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: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable X-Archives-Salt: b1925669-cd6e-4f56-a8b3-038a18b3465b X-Archives-Hash: a3d651ef9f271e92f07e02d4327147a5 On Sun, 26 May 2013 05:49:48 -0400 Rich Freeman wrote: > On Sun, May 26, 2013 at 4:32 AM, Ben de Groot > wrote: > > On 26 May 2013 15:37, Micha=C5=82 G=C3=B3rny wrote: > >> > >> Considering the design of OpenRC itself, it wouldn't be *that > >> hard*. Actually, a method similar to one used in oldnet would > >> simply work. That is, symlinking init.d files to a common > >> 'systemd-wrapper' executable which would parse the unit files. > > > > I think this idea actually makes sense. Re-using upstream work > > seems a logical idea, and could ease maintenance. Of course the > > issue is whether the OpenRC devs see any benefit in this. >=20 > Init.d scripts are just shell scripts. All somebody needs to do is > write a shell script that parses a unit file and does what it says, > and exports an openrc-oriented init.d environment. That can be > packaged separately, or whatever, and maybe an eclass could make it > easy to install (point it at the upstream/filesdir unit and tell it > what to call the init.d script, and you get the appropriate > symlink/script). >=20 > The OpenRC devs don't have to endorse anything - sure it would make > sense to bundle it, but it could just as easily be pulled in as a dep > or used manually by a user. >=20 > The script could ignore any unit features that aren't implemented. > You can ignore settings like auto-restart/inetd and just use the > settings that get the daemon started. >=20 > Rich >=20 +1 I would rather add shell script to parse unit and generate appropriate init script while building than have initscript wrapper that will call and parse on execution. As you said, some eclass. Robert.