1
0
mirror of https://github.com/systemd/systemd.git synced 2024-12-23 21:35:11 +03:00

net-util: add support for Type=ethernet

When DEVTYPE is not set for a nic, it means it is a wired/ethernet
device.
This commit is contained in:
Tom Gundersen 2014-01-03 20:55:23 +01:00
parent 8b264404b6
commit 4cd1214db6
3 changed files with 5 additions and 3 deletions

View File

@ -146,7 +146,8 @@
<term><varname>Type</varname></term>
<listitem>
<para>The device type, as exposed by the udev property
<literal>DEVTYPE</literal>.</para>
<literal>DEVTYPE</literal>, or <literal>ethernet</literal>
to match devices without a <literal>DEVTYPE</literal>.</para>
</listitem>
</varlistentry>
<varlistentry>

View File

@ -793,7 +793,8 @@
<varlistentry>
<term><varname>Type</varname></term>
<listitem>
<para>The device type, as exposed by the udev property <literal>DEVTYPE</literal>.</para>
<para>The device type, as exposed by the udev property <literal>DEVTYPE</literal>, or
<literal>ethernet</literal> to match a device without a <literal>DEVTYPE</literal>.</para>
</listitem>
</varlistentry>
</variablelist>

View File

@ -49,7 +49,7 @@ bool net_match_config(const struct ether_addr *match_mac,
if (match_driver && !streq_ptr(match_driver, dev_driver))
return 0;
if (match_type && !streq_ptr(match_type, dev_type))
if (match_type && !streq_ptr(match_type, dev_type) && !(streq(match_type, "ethernet") && !dev_type))
return 0;
if (match_name && !streq_ptr(match_name, dev_name))