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

Pekka Lundström pekka.lundstrom at jollamobile.com
Wed Dec 19 08:24:47 PST 2012


On 12/19/2012 06:00 PM, Lennart Poettering wrote:
> On Mon, 10.12.12 17:27, Colin Guthrie (gmane at colin.guthr.ie) wrote:
>
>> 'Twas brillig, and Pekka Lundstrom at 10/12/12 13:56 did gyre and gimble:
>>> +                                <term><varname>EnvironmentDir=</varname></term>
>>> +                                <listitem><para>Similar to
>>> +                                <varname>EnvironmentFile=</varname> 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 <varname>EnvironmentFile=</varname>.
>>
>> 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



More information about the systemd-devel mailing list