[systemd-devel] [Featur Request] Allow list of names in file.network
Tom Gundersen
teg at jklm.no
Thu Oct 23 11:14:45 PDT 2014
On Thu, Oct 2, 2014 at 12:40 PM, Lennart Poettering
<lennart at poettering.net> wrote:
> On Thu, 25.09.14 19:39, Damien Robert (damien.olivier.robert+gmane at gmail.com) wrote:
>
>> This is a minor feature request for systemd-networkd:
>> my files in /etc/systemd/network/ all share the same pattern:
>>
>> [Match]
>> Name=en*
>> [Network]
>> DHCP=yes
>>
>> [Match]
>> Name=eth*
>> [Network]
>> DHCP=yes
>>
>> [Match]
>> Name=usb*
>> [Network]
>> DHCP=yes
>>
>> I would like to be able to only write one file, like
>>
>> [Match]
>> Name=en*,eth*,usb*
>> [Network]
>> DHCP=yes
>>
>> or maybe to imitate "extended globs" like so
>>
>> [Match]
>> Name={en,eth,usb}*
>> [Network]
>> DHCP=yes
>>
>> This would greatly facilitate adding common options like custom DNS and so
>> on.
>
> I think a simpler syntax that keeps the POSIX globbing would be to simply allow mutiple Name= switches to be set:
>
> Name=en*
> Name=usb*
>
> and so on. Tom, what do you think?
Yes, this absolutely makes sense. Maybe even en*|usb*, like the udev
logic. Happy to take a patch, but put on TODO for now.
Cheers,
Tom
More information about the systemd-devel
mailing list