Re: [systemd-devel] [PATCH] Added support for EnvironmentDir

2012-12-10 Thread Jóhann B. Guðmundsson


...


What's the usecase for environment directory?

JBG
___
systemd-devel mailing list
systemd-devel@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/systemd-devel


Re: [systemd-devel] [PATCH] Added support for EnvironmentDir

2012-12-10 Thread Pekka Lundström

On 12/10/2012 04:17 PM, "Jóhann B. Guðmundsson" wrote:
> 
> ...
> 
> What's the usecase for environment directory?


Especially for user session we need to have common set of environment 
variables and these
variables are coming from multiple packages. It doesn't work with 
environment files
because file names are not known to lower level component that is 
providing startup file
for user session. Now with environmet directory we only need to agree 
that each package
that needs to distribute environment variables installs xyz.conf file to 
common dir.


___
systemd-devel mailing list
systemd-devel@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/systemd-devel


Re: [systemd-devel] [PATCH] Added support for EnvironmentDir

2012-12-10 Thread Colin Guthrie
'Twas brillig, and Pekka Lundstrom at 10/12/12 13:56 did gyre and gimble:
> +
> EnvironmentDir=
> +Similar to
> +EnvironmentFile= but
> +reads the environment variables from a
> +directory containing files. Each file in
> +that directory named with ".conf" suffix
> +is read and prosessed and these files
> +should follow same syntax as files
> +listed with 
> EnvironmentFile=.


While not commenting on the need/usefulness etc. of the patch, would it
be possible to make the EnvironmentFile directive simply support globbing?

e.g. Rather than doing:

EnvironmentDir=/etc/foo.d

I could just have:

EnvironmentFile=/etc/foo.d/*.conf


That would, to me at least, seem slightly cleaner than adding a new
directive to parse (although this is just my opinion at first glance -
others may disagree!).

Col

-- 

Colin Guthrie
gmane(at)colin.guthr.ie
http://colin.guthr.ie/

Day Job:
  Tribalogic Limited http://www.tribalogic.net/
Open Source:
  Mageia Contributor http://www.mageia.org/
  PulseAudio Hacker http://www.pulseaudio.org/
  Trac Hacker http://trac.edgewall.org/

___
systemd-devel mailing list
systemd-devel@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/systemd-devel


Re: [systemd-devel] [PATCH] Added support for EnvironmentDir

2012-12-19 Thread Lennart Poettering
On Mon, 10.12.12 17:27, Colin Guthrie (gm...@colin.guthr.ie) wrote:

> 
> 'Twas brillig, and Pekka Lundstrom at 10/12/12 13:56 did gyre and gimble:
> > +
> > EnvironmentDir=
> > +Similar to
> > +EnvironmentFile= but
> > +reads the environment variables from a
> > +directory containing files. Each file in
> > +that directory named with ".conf" suffix
> > +is read and prosessed and these files
> > +should follow same syntax as files
> > +listed with 
> > EnvironmentFile=.
> 
> 
> While not commenting on the need/usefulness etc. of the patch, would it
> be possible to make the EnvironmentFile directive simply support globbing?
> 
> e.g. Rather than doing:
> 
> EnvironmentDir=/etc/foo.d
> 
> I could just have:
> 
> EnvironmentFile=/etc/foo.d/*.conf
> 
> That would, to me at least, seem slightly cleaner than adding a new
> directive to parse (although this is just my opinion at first glance -
> others may disagree!).

I agree with Colin. This would be much nicer with globbing. Also, it
would then be a natural extension to allow multiple files to be
specified in a single line:

EnvironmentFile=/etc/foo.conf /etc/foo.conf.d/*.conf /run/foo.conf.d/*.conf

I'd be happy to merge such a patch.

Lennart

-- 
Lennart Poettering - Red Hat, Inc.
___
systemd-devel mailing list
systemd-devel@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/systemd-devel


Re: [systemd-devel] [PATCH] Added support for EnvironmentDir

2012-12-19 Thread Pekka Lundström


On 12/19/2012 06:00 PM, Lennart Poettering wrote:

On Mon, 10.12.12 17:27, Colin Guthrie (gm...@colin.guthr.ie) wrote:


'Twas brillig, and Pekka Lundstrom at 10/12/12 13:56 did gyre and gimble:

+EnvironmentDir=
+Similar to
+EnvironmentFile= but
+reads the environment variables from a
+directory containing files. Each file in
+that directory named with ".conf" suffix
+is read and prosessed and these files
+should follow same syntax as files
+listed with 
EnvironmentFile=.


While not commenting on the need/usefulness etc. of the patch, would it
be possible to make the EnvironmentFile directive simply support globbing?

e.g. Rather than doing:

EnvironmentDir=/etc/foo.d

I could just have:

EnvironmentFile=/etc/foo.d/*.conf

That would, to me at least, seem slightly cleaner than adding a new
directive to parse (although this is just my opinion at first glance -
others may disagree!).

I agree with Colin. This would be much nicer with globbing. Also, it
would then be a natural extension to allow multiple files to be
specified in a single line:

EnvironmentFile=/etc/foo.conf /etc/foo.conf.d/*.conf /run/foo.conf.d/*.conf

I'd be happy to merge such a patch.

Lennart



OK, I'll redo the feature.

t. Pekka

___
systemd-devel mailing list
systemd-devel@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/systemd-devel


Re: [systemd-devel] [PATCH] Added support for EnvironmentDir

2012-12-19 Thread Kok, Auke-jan H
On Wed, Dec 19, 2012 at 8:00 AM, Lennart Poettering
 wrote:
> On Mon, 10.12.12 17:27, Colin Guthrie (gm...@colin.guthr.ie) wrote:
>
>>
>> 'Twas brillig, and Pekka Lundstrom at 10/12/12 13:56 did gyre and gimble:
>> > +
>> > EnvironmentDir=
>> > +Similar to
>> > +EnvironmentFile= but
>> > +reads the environment variables from a
>> > +directory containing files. Each file in
>> > +that directory named with ".conf" suffix
>> > +is read and prosessed and these files
>> > +should follow same syntax as files
>> > +listed with 
>> > EnvironmentFile=.
>>
>>
>> While not commenting on the need/usefulness etc. of the patch, would it
>> be possible to make the EnvironmentFile directive simply support globbing?
>>
>> e.g. Rather than doing:
>>
>> EnvironmentDir=/etc/foo.d
>>
>> I could just have:
>>
>> EnvironmentFile=/etc/foo.d/*.conf
>>
>> That would, to me at least, seem slightly cleaner than adding a new
>> directive to parse (although this is just my opinion at first glance -
>> others may disagree!).
>
> I agree with Colin. This would be much nicer with globbing. Also, it
> would then be a natural extension to allow multiple files to be
> specified in a single line:
>
> EnvironmentFile=/etc/foo.conf /etc/foo.conf.d/*.conf /run/foo.conf.d/*.conf
>
> I'd be happy to merge such a patch.

Pekka, this will help a lot - thanks - looking forward to seeing this feature.

Auke
___
systemd-devel mailing list
systemd-devel@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/systemd-devel