Re: [systemd-devel] Shell expressions in EnvironmentFile

2014-10-24 Thread Damien Robert
>From Lennart Poettering, Wed 08 Oct 2014 at 20:48:55 (+0200) : > SyslogIdentifier= should do it. It works, thanks! > See systemd.exec(5) for details. When I was looking for something like that in the doc, I was confused by this passage: "This option is only useful when StandardOutput= or Standa

Re: [systemd-devel] Shell expressions in EnvironmentFile

2014-10-24 Thread Mantas Mikulėnas
On Tue, Oct 7, 2014 at 8:12 PM, Jon Stanley wrote: > Since EnvironmentFile in a service isn't sourced by any shell, shell > expressions in it will obviously not work the way that they did in a > SysV style script. > > Nor does it seems that the environment gets preserved between > ExecStartPre (wh

Re: [systemd-devel] Shell expressions in EnvironmentFile

2014-10-09 Thread Lennart Poettering
On Thu, 09.10.14 10:00, Damien Robert (damien.olivier.rob...@gmail.com) wrote: > >From Lennart Poettering, Wed 08 Oct 2014 at 20:48:55 (+0200) : > > SyslogIdentifier= should do it. > > It works, thanks! > > > See systemd.exec(5) for details. > > When I was looking for something like that in the

Re: [systemd-devel] Shell expressions in EnvironmentFile

2014-10-08 Thread Lennart Poettering
On Wed, 08.10.14 18:07, Damien Robert (damien.olivier.robert+gm...@gmail.com) wrote: > Lennart Poettering wrote in message > <20141008094838.GB26284@gardel-login>: > > On Tue, 07.10.14 19:18, Simon Peeters (peeters.si...@gmail.com) wrote: > >> ExecStart=/bin/sh -c ". /something/that/sets/var; /s

Re: [systemd-devel] Shell expressions in EnvironmentFile

2014-10-08 Thread Damien Robert
Lennart Poettering wrote in message <20141008094838.GB26284@gardel-login>: > On Tue, 07.10.14 19:18, Simon Peeters (peeters.si...@gmail.com) wrote: >> ExecStart=/bin/sh -c ". /something/that/sets/var; /some/file $var" > THis would certainly work, but I'd strongly advise to use "exec" for > executi

Re: [systemd-devel] Shell expressions in EnvironmentFile

2014-10-08 Thread Lennart Poettering
On Tue, 07.10.14 19:18, Simon Peeters (peeters.si...@gmail.com) wrote: > 2014-10-07 19:12 GMT+02:00 Jon Stanley : > > Since EnvironmentFile in a service isn't sourced by any shell, shell > > expressions in it will obviously not work the way that they did in a > > SysV style script. > > > > Nor doe

Re: [systemd-devel] Shell expressions in EnvironmentFile

2014-10-08 Thread Lennart Poettering
On Tue, 07.10.14 13:12, Jon Stanley (jonstan...@gmail.com) wrote: > Since EnvironmentFile in a service isn't sourced by any shell, shell > expressions in it will obviously not work the way that they did in a > SysV style script. > > Nor does it seems that the environment gets preserved between >

Re: [systemd-devel] Shell expressions in EnvironmentFile

2014-10-07 Thread Dale R. Worley
> From: Simon Peeters > > 2014-10-07 19:12 GMT+02:00 Jon Stanley : > > [Service] > > ExecStartPre=/something/that/sets/var > > ExecStart=/some/file $var > > ExecStart=/bin/sh -c ". /something/that/sets/var; /some/file $var" Yeah, I think some thing like this would work: ExecStartPre=/bin/sh -c

Re: [systemd-devel] Shell expressions in EnvironmentFile

2014-10-07 Thread Simon Peeters
2014-10-07 19:12 GMT+02:00 Jon Stanley : > Since EnvironmentFile in a service isn't sourced by any shell, shell > expressions in it will obviously not work the way that they did in a > SysV style script. > > Nor does it seems that the environment gets preserved between > ExecStartPre (where one cou

[systemd-devel] Shell expressions in EnvironmentFile

2014-10-07 Thread Jon Stanley
Since EnvironmentFile in a service isn't sourced by any shell, shell expressions in it will obviously not work the way that they did in a SysV style script. Nor does it seems that the environment gets preserved between ExecStartPre (where one could run a script that sets environment variables to b