On Mon, 04.07.16 09:40, wolfgang.wag...@riwa-gis.de 
(wolfgang.wag...@riwa-gis.de) wrote:

> >-----Ursprüngliche Nachricht-----
> >Von: Lennart Poettering [mailto:lenn...@poettering.net]
> >Betreff: Re: [systemd-devel] How to mount NFS prior to start postgresql from 
> >this volume
> >
> >Normally, if you want a service to run only after all NFS mounts are in 
> >place, add an ordering dependency towards remote-fs.target to it. 
> >Specifically: add a drop-in file
> >/etc/systemd/system/postgresql@.service.d/50-nfs.conf and write into it:
> >
> > <snip>
> > [Unit]
> > After=remote-fs.target
> > </snip>
> 
> 
> Thank You Lennart,
> 
> your tip was the solution for my problem.
> Now all works as expected.
> Only one question remains: I do not understand, why the "@" in the
> directory-name is necessary or what it does.

The "@" in the name indicates a templated unit. Templated units allow
you to write a single unit file that can be instantiated multiple
times. Not sure how precisely your postgresql packages make use of
this though.

A common example for this is getty@.service (the linux login prompt
thingy) which is the template that gets instantiated multiple times
for each tty the prompt is shown, and thus becomes getty@tty1.service,
getty@tty2.service and so on. See systemd.unit(5) for more information
about templates and instances of them.

By using drop-ins you may either extend the config of all instances of
a template, or just of one specific instance, by using the drop-in dir
/etc/systemd/system/foo@.service.d/ or
/etc/systemd/system/foo@bar.service.d/. The former applies to all
instances (as the instance part is left empty), and the latter only to
the instance "bar" of it.

Lennart

-- 
Lennart Poettering, Red Hat
_______________________________________________
systemd-devel mailing list
systemd-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/systemd-devel

Reply via email to