</para>
</listitem>
</varlistentry>
+ <varlistentry>
+ <term><varname>Architecture</varname></term>
+ <listitem>
+ <para>Checks whether the system is running on a specific
+ architecture. See <literal>ConditionArchitecture=</literal> in
+ <citerefentry><refentrytitle>systemd.unit</refentrytitle><manvolnum>5</manvolnum></citerefentry>
+ for details.
+ </para>
+ </listitem>
+ </varlistentry>
</variablelist>
<para>The <literal>[NetDev]</literal> section accepts the following
</para>
</listitem>
</varlistentry>
+ <varlistentry>
+ <term><varname>Architecture</varname></term>
+ <listitem>
+ <para>Checks whether the system is running on a specific
+ architecture. See <literal>ConditionArchitecture=</literal> in
+ <citerefentry><refentrytitle>systemd.unit</refentrytitle><manvolnum>5</manvolnum></citerefentry>
+ for details.
+ </para>
+ </listitem>
+ </varlistentry>
</variablelist>
<para>The <literal>[Network]</literal> section accepts the following keys:</para>
for details.</para>
</listitem>
</varlistentry>
+ <varlistentry>
+ <term><varname>Architecture</varname></term>
+ <listitem>
+ <para>Checks whether the system is running on a specific
+ architecture. See <literal>ConditionArchitecture=</literal> in
+ <citerefentry><refentrytitle>systemd.unit</refentrytitle><manvolnum>5</manvolnum></citerefentry>
+ for details.</para>
+ </listitem>
+ </varlistentry>
</variablelist>
<para>The <literal>[Link]</literal> section accepts the following keys:</para>
%struct-type
%includes
%%
-Match.Host, config_parse_net_condition, CONDITION_HOST, offsetof(NetDev, condition_host)
-Match.Virtualization, config_parse_net_condition, CONDITION_VIRTUALIZATION, offsetof(NetDev, condition_virt)
-Match.KernelCommandLine, config_parse_net_condition, CONDITION_KERNEL_COMMAND_LINE, offsetof(NetDev, condition_kernel)
+Match.Host, config_parse_net_condition, CONDITION_HOST, offsetof(NetDev, match_host)
+Match.Virtualization, config_parse_net_condition, CONDITION_VIRTUALIZATION, offsetof(NetDev, match_virt)
+Match.KernelCommandLine, config_parse_net_condition, CONDITION_KERNEL_COMMAND_LINE, offsetof(NetDev, match_kernel)
+Match.Architecture, config_parse_net_condition, CONDITION_ARCHITECTURE, offsetof(NetDev, match_arch)
NetDev.Description, config_parse_string, 0, offsetof(NetDev, description)
NetDev.Name, config_parse_ifname, 0, offsetof(NetDev, name)
NetDev.Kind, config_parse_netdev_kind, 0, offsetof(NetDev, kind)
return log_oom();
if (net_match_config(NULL, NULL, NULL, NULL, NULL,
- netdev->condition_host, netdev->condition_virt,
- netdev->condition_kernel, NULL, NULL, NULL,
- NULL, NULL) <= 0)
+ netdev->match_host, netdev->match_virt,
+ netdev->match_kernel, netdev->match_arch,
+ NULL, NULL, NULL, NULL, NULL) <= 0)
return 0;
r = hashmap_put(netdev->manager->netdevs, netdev->name, netdev);
Match.Host, config_parse_net_condition, CONDITION_HOST, offsetof(Network, match_host)
Match.Virtualization, config_parse_net_condition, CONDITION_VIRTUALIZATION, offsetof(Network, match_virt)
Match.KernelCommandLine, config_parse_net_condition, CONDITION_KERNEL_COMMAND_LINE, offsetof(Network, match_kernel)
+Match.Architecture, config_parse_net_condition, CONDITION_ARCHITECTURE, offsetof(Network, match_arch)
Network.Description, config_parse_string, 0, offsetof(Network, description)
Network.Bridge, config_parse_bridge, 0, offsetof(Network, bridge)
Network.Bond, config_parse_bond, 0, offsetof(Network, bond)
network->match_driver, network->match_type,
network->match_name, network->match_host,
network->match_virt, network->match_kernel,
+ network->match_arch,
udev_device_get_sysattr_value(device, "address"),
udev_device_get_property_value(device, "ID_PATH"),
udev_device_get_driver(udev_device_get_parent(device)),
char *filename;
- Condition *condition_host;
- Condition *condition_virt;
- Condition *condition_kernel;
+ Condition *match_host;
+ Condition *match_virt;
+ Condition *match_kernel;
+ Condition *match_arch;
char *description;
char *name;
Condition *match_host;
Condition *match_virt;
Condition *match_kernel;
+ Condition *match_arch;
char *description;
NetDev *bridge;
Condition *match_host,
Condition *match_virt,
Condition *match_kernel,
+ Condition *match_arch,
const char *dev_mac,
const char *dev_path,
const char *dev_driver,
if (match_kernel && !condition_test_kernel_command_line(match_kernel))
return 0;
+ if (match_arch && !condition_test_architecture(match_arch))
+ return 0;
+
if (match_mac && (!dev_mac || memcmp(match_mac, ether_aton(dev_mac), ETH_ALEN)))
return 0;
Condition *match_host,
Condition *match_virt,
Condition *match_kernel,
+ Condition *match_arch,
const char *dev_mac,
const char *dev_path,
const char *dev_driver,
Match.Host, config_parse_net_condition, CONDITION_HOST, offsetof(link_config, match_host)
Match.Virtualization, config_parse_net_condition, CONDITION_VIRTUALIZATION, offsetof(link_config, match_virt)
Match.KernelCommandLine, config_parse_net_condition, CONDITION_KERNEL_COMMAND_LINE, offsetof(link_config, match_kernel)
+Match.Architecture, config_parse_net_condition, CONDITION_ARCHITECTURE, offsetof(link_config, match_arch)
Link.Description, config_parse_string, 0, offsetof(link_config, description)
Link.MACAddressPolicy, config_parse_mac_policy, 0, offsetof(link_config, mac_policy)
Link.MACAddress, config_parse_hwaddr, 0, offsetof(link_config, mac)
LIST_FOREACH(links, link, ctx->links) {
- if (net_match_config(link->match_mac, link->match_path,
- link->match_driver, link->match_type, NULL,
- link->match_host, link->match_virt, link->match_kernel,
+ if (net_match_config(link->match_mac, link->match_path, link->match_driver,
+ link->match_type, NULL, link->match_host,
+ link->match_virt, link->match_kernel, link->match_arch,
udev_device_get_sysattr_value(device, "address"),
udev_device_get_property_value(device, "ID_PATH"),
udev_device_get_driver(udev_device_get_parent(device)),
Condition *match_host;
Condition *match_virt;
Condition *match_kernel;
+ Condition *match_arch;
char *description;
struct ether_addr *mac;