]> git.ipfire.org Git - thirdparty/systemd.git/commitdiff
udev/rules.d: import hwdb before calling net_id builtin
authorYu Watanabe <watanabe.yu+github@gmail.com>
Thu, 12 Jun 2025 09:25:54 +0000 (18:25 +0900)
committerLuca Boccassi <luca.boccassi@gmail.com>
Fri, 13 Jun 2025 09:43:21 +0000 (10:43 +0100)
The commit cdcb1eeeb883b2ecb3992865f458f874900ddb87 adds
ID_NET_NAME_INCLUDE_DOMAIN property support in net_id builtin.
The property is basically set through hwdb. However, previously hwdb was
imported after calling net_id builtin, hence when net_id is called, the
property was never set.

This makes hwdb is imported before calling net_id builtin, so that the
property is set when net_id is called if hwdb has an entry about that
for the interface.

Follow-up for cdcb1eeeb883b2ecb3992865f458f874900ddb87.
Fixes #37758.

rules.d/75-net-description.rules

index 5ba70a654500acc408f54e7f0fb9712cf54a537c..e154cfab6cd6cd00fceb48132a70f737f7ebc8e7 100644 (file)
@@ -5,12 +5,13 @@ SUBSYSTEM!="net", GOTO="net_end"
 
 IMPORT{builtin}="hwdb 'net:naming:dr$env{ID_NET_DRIVER}:'"
 
-IMPORT{builtin}="net_id"
-
 SUBSYSTEMS=="usb", IMPORT{builtin}="usb_id", IMPORT{builtin}="hwdb --subsystem=usb"
-SUBSYSTEMS=="usb", GOTO="net_end"
+SUBSYSTEMS=="usb", GOTO="import_net_id"
 
 SUBSYSTEMS=="pci", ENV{ID_BUS}="pci", ENV{ID_VENDOR_ID}="$attr{vendor}", ENV{ID_MODEL_ID}="$attr{device}"
 SUBSYSTEMS=="pci", IMPORT{builtin}="hwdb --subsystem=pci"
 
+LABEL="import_net_id"
+IMPORT{builtin}="net_id"
+
 LABEL="net_end"