[arch-general] about FS#30053 and systemd service/unit file in general

Rodrigo Rivas rodrigorivascosta at gmail.com
Mon Jun 11 06:02:20 EDT 2012


On Mon, Jun 11, 2012 at 10:59 AM, solsTiCe d'Hiver <
solstice.dhiver at gmail.com> wrote:

> For me, systemd service/unit file are just meant to be that, tailored to
> archlinux.
>
> I think that they talk about the lines

    EnvironmentFile=/etc/conf.d/gpm
    ExecStart=/usr/sbin/gpm $GPM_ARGS

The /etc/conf.d/gpm files is used _only_ for givin options to the gmp
daemon. In a systemd configuration you usually dont want or need this.
Simply have a file /usr/lib/systemd/system/gpm.service with:

    ExecStart=/usr/sbin/gpm

If you need to pass extra arguments you copy it into
/etc/systemd/system/pm.service and change the line

    ExecStart=/usr/sbin/gpm --extra-options

And no need for extra /etc/conf.d/* files. Naturally, if you really want
you can still use the file with EnvironmentFile=, but that's not the
Systemd Way (tm).

Personally I would prefer that the package version would have:

    ExecStart=/usr/sbin/gpm $GPM_ARGS

Without even defining the GPM_ARGS variable (or with a sane default). And
then we can have in /etc/...:

    .include /usr/lib/systemd/system/gpm.service

    [Service]
    Environment=GPM_ARGS=--extra-options

Or even EnvironmentFile=... And no need to keep track of every change in
the upstream file.
Just my two cents.

Regards.
--
Rodrigo


More information about the arch-general mailing list