mirror of
https://github.com/systemd/systemd-stable.git
synced 2024-11-01 00:51:08 +03:00
rules_generator: net rules - add "dev_id" value to generated rules
This commit is contained in:
parent
d8a9d01704
commit
8b6e9f287d
@ -29,6 +29,9 @@ ENV{MATCHADDR}="$attr{address}"
|
||||
# match interface type
|
||||
ENV{MATCHIFTYPE}="$attr{type}"
|
||||
|
||||
# match interface dev_id
|
||||
ATTR{dev_id}=="?*", ENV{MATCHDEVID}="$attr{dev_id}"
|
||||
|
||||
# do not use "locally administered" MAC address
|
||||
ENV{MATCHADDR}=="?[2367abef]:*", ENV{MATCHADDR}=""
|
||||
|
||||
|
@ -15,6 +15,7 @@
|
||||
# variables used to communicate:
|
||||
# MATCHADDR MAC address used for the match
|
||||
# MATCHID bus_id used for the match
|
||||
# MATCHDEVID dev_id used for the match
|
||||
# MATCHDRV driver name used for the match
|
||||
# MATCHIFTYPE interface type match
|
||||
# COMMENT comment to add to the generated rule
|
||||
@ -78,6 +79,10 @@ if [ "$MATCHDRV" ]; then
|
||||
match="$match, DRIVERS==\"$MATCHDRV\""
|
||||
fi
|
||||
|
||||
if [ "$MATCHDEVID" ]; then
|
||||
match="$match, ATTR{dev_id}==\"$MATCHDEVID\""
|
||||
fi
|
||||
|
||||
if [ "$MATCHID" ]; then
|
||||
match="$match, KERNELS==\"$MATCHID\""
|
||||
fi
|
||||
|
Loading…
Reference in New Issue
Block a user