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 E59731381F3 for ; Sun, 26 May 2013 13:37:25 +0000 (UTC) Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id 4C76BE0D23; Sun, 26 May 2013 13:37:19 +0000 (UTC) Received: from smtp.gentoo.org (smtp.gentoo.org [140.211.166.183]) (using TLSv1 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by pigeon.gentoo.org (Postfix) with ESMTPS id 50A94E0D1A for ; Sun, 26 May 2013 13:37:18 +0000 (UTC) Received: from sf (unknown [178.121.57.192]) (using TLSv1.2 with cipher DHE-RSA-AES128-SHA (128/128 bits)) (No client certificate requested) (Authenticated sender: slyfox) by smtp.gentoo.org (Postfix) with ESMTPSA id A2E6233DF13; Sun, 26 May 2013 13:37:16 +0000 (UTC) Date: Sun, 26 May 2013 16:35:46 +0300 From: Sergei Trofimovich To: gentoo-dev@lists.gentoo.org Cc: lu_zero@gentoo.org Subject: Re: [gentoo-dev] Reusing systemd unit file format / forking systemd Message-ID: <20130526163546.22e99903@sf> In-Reply-To: <51A1F926.7010805@gentoo.org> References: <20130526093755.42b62259@gentoo.org> <51A1E2B7.5020803@gentoo.org> <20130526131557.15a599b8@gentoo.org> <51A1F926.7010805@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: multipart/signed; micalg=PGP-SHA1; boundary="Sig_/mVb9HM/urSMo.ECCEYbcZJd"; protocol="application/pgp-signature" X-Archives-Salt: d477bb1d-f620-4dd0-ab00-c05f39ef4a0e X-Archives-Hash: 6930560f2b4f6ef287e98b4518659e73 --Sig_/mVb9HM/urSMo.ECCEYbcZJd Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable On Sun, 26 May 2013 13:59:34 +0200 Luca Barbato wrote: > On 5/26/13 1:15 PM, Micha=C5=82 G=C3=B3rny wrote: > > I'd suspect this is mostly with the growing irritation of systemd > > haters who spawn endless threads about how they hate anything with > > 'systemd' name in it. Plus the people who try hard to port the mistakes > > of OpenRC init scripts to systemd services files. >=20 > Here we have a problem, the people that need more flexibility to=20 > actually get work done will see that the inflexibility of the unit=20 > format will bite them and bite them hard. >=20 > A simple example is something fairly easy for a runscript and quite=20 > annoying for an unit, multiple instances. >=20 > for openrc you can just symlink using a proper pattern and have the=20 > initscript figure the right configuration and which user/chroot use to=20 > drop the daemon. You need to name a unit with @ suffix, like openvpn@.service: $ cat /etc/systemd/system/openvpn@.service=20 [Service] Type=3Dsimple ExecStart=3D/usr/sbin/openvpn --user openvpn --group openvpn --cd /etc/= openvpn --chroot /var/run/openvpn --config %I.conf feel free to sprinkle %i (and others) for templating. and symlink it as you like. openvpn@foo.service (or openvpn@foo) will be direct analogue to openvpn.foo. (+ foo.service.d with the same(?) o= verride semantics) > for systemd you have to copy and edit since most fields are immutable=20 > (some are with special rules). .include /path/to/unit OverrideedField =3D OverridedValue will not help here, right? --=20 Sergei --Sig_/mVb9HM/urSMo.ECCEYbcZJd Content-Type: application/pgp-signature; name=signature.asc Content-Disposition: attachment; filename=signature.asc -----BEGIN PGP SIGNATURE----- Version: GnuPG v2.0.19 (GNU/Linux) iEYEARECAAYFAlGiD7UACgkQcaHudmEf86r2xgCfWTe5oLHMFPdzUykTA8ns8pYd VuwAnA1mFlJQ8sZzib4op4IFMuvMzOoQ =/ykW -----END PGP SIGNATURE----- --Sig_/mVb9HM/urSMo.ECCEYbcZJd--