public inbox for gentoo-dev@lists.gentoo.org
 help / color / mirror / Atom feed
From: Sergei Trofimovich <slyfox@gentoo.org>
To: gentoo-dev@lists.gentoo.org
Cc: lu_zero@gentoo.org
Subject: Re: [gentoo-dev] Reusing systemd unit file format / forking systemd
Date: Sun, 26 May 2013 16:35:46 +0300	[thread overview]
Message-ID: <20130526163546.22e99903@sf> (raw)
In-Reply-To: <51A1F926.7010805@gentoo.org>

[-- Attachment #1: Type: text/plain, Size: 1599 bytes --]

On Sun, 26 May 2013 13:59:34 +0200
Luca Barbato <lu_zero@gentoo.org> wrote:

> On 5/26/13 1:15 PM, Michał Górny 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.
> 
> Here we have a problem, the people that need more flexibility to 
> actually get work done will see that the inflexibility of the unit 
> format will bite them and bite them hard.
> 
> A simple example is something fairly easy for a runscript and quite 
> annoying for an unit, multiple instances.
> 
> for openrc you can just symlink using a proper pattern and have the 
> initscript figure the right configuration and which user/chroot use to 
> drop the daemon.

You need to name a unit with @ suffix, like openvpn@.service:

    $ cat /etc/systemd/system/openvpn@.service 
    [Service]
    Type=simple
    ExecStart=/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(?) override semantics)

> for systemd you have to copy and edit since most fields are immutable 
> (some are with special rules).

    .include /path/to/unit
    OverrideedField = OverridedValue
will not help here, right?

-- 

  Sergei

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 198 bytes --]

  reply	other threads:[~2013-05-26 13:37 UTC|newest]

Thread overview: 44+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-05-25 16:14 [gentoo-dev] Going against co-maintainer's wishes (ref. bug 412697) Ben de Groot
2013-05-25 16:48 ` Michał Górny
2013-05-25 17:38   ` Rich Freeman
2013-05-25 20:02     ` Chí-Thanh Christopher Nguyễn
2013-05-25 20:40       ` Rich Freeman
2013-05-25 20:45       ` Michał Górny
2013-05-25 21:38   ` Luca Barbato
2013-05-26  7:23   ` Ben de Groot
2013-05-26  7:43     ` Michał Górny
2013-05-26 10:04       ` Rich Freeman
2013-05-26 15:21         ` Ben de Groot
2013-05-26 16:15           ` Rick "Zero_Chaos" Farina
2013-05-26 17:14             ` Matt Turner
2013-05-26 17:19             ` Andreas K. Huettel
2013-05-26  7:54     ` Pacho Ramos
2013-05-25 17:00 ` Pacho Ramos
2013-05-25 17:14   ` Carlos Silva
2013-05-26  7:15   ` Ben de Groot
2013-05-26  7:44     ` Pacho Ramos
2013-05-26  7:45     ` Michał Górny
2013-05-26  9:59       ` Luca Barbato
2013-05-25 18:13 ` Markos Chandras
2013-05-25 19:53   ` Anthony G. Basile
2013-05-25 19:58     ` Mike Gilbert
2013-05-25 21:55       ` Anthony G. Basile
2013-05-25 19:59     ` Rich Freeman
2013-05-26  7:00     ` Michał Górny
2013-05-26  7:22     ` Tiziano Müller
2013-05-26  7:46       ` Pacho Ramos
2013-05-26  7:49       ` Michał Górny
2013-05-26  7:00   ` Ben de Groot
2013-05-26  7:37 ` [gentoo-dev] Reusing systemd unit file format / forking systemd (was: Going against co-maintainer's wishes (ref. bug 412697)) Michał Górny
2013-05-26  8:32   ` Ben de Groot
2013-05-26  9:49     ` Rich Freeman
2013-05-26 10:12       ` Robert David
2013-05-26 10:31         ` Michał Górny
2013-05-26 11:12           ` Rich Freeman
2013-05-26 11:31           ` Robert David
2013-05-26 11:47             ` [gentoo-dev] Reusing systemd unit file format / forking systemd Luca Barbato
2013-05-26 10:23   ` Luca Barbato
2013-05-26 11:15     ` Michał Górny
2013-05-26 11:59       ` Luca Barbato
2013-05-26 13:35         ` Sergei Trofimovich [this message]
2013-05-26 14:22           ` Luca Barbato

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20130526163546.22e99903@sf \
    --to=slyfox@gentoo.org \
    --cc=gentoo-dev@lists.gentoo.org \
    --cc=lu_zero@gentoo.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox