[systemd-devel] [Featur Request] Allow list of names in file.network

Lennart Poettering lennart at poettering.net
Thu Oct 2 03:40:53 PDT 2014


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?

Lennart

-- 
Lennart Poettering, Red Hat


More information about the systemd-devel mailing list