1
1
mirror of https://github.com/systemd/systemd-stable.git synced 2024-10-30 23:21:08 +03:00

rules_generator: add KERNEL=="<netifname>*" to generated rules

Some boxes, like the PS3, have multiple independent hardware
interfaces, all sharing the same MAC address. If they have
different interface names base names, we can distinguish them
that way.
This commit is contained in:
Kay Sievers 2008-03-13 16:31:14 +01:00
parent 5ee7ecfb0f
commit 9138bcba99

View File

@ -102,6 +102,7 @@ if [ "$INTERFACE_NAME" ]; then
else
# if a rule using the current name already exists, find a new name
basename=${INTERFACE%%[0-9]*}
match="$match, KERNEL==\"$basename*\""
if interface_name_taken; then
INTERFACE="$basename$(find_next_available "$basename[0-9]*")"
echo "INTERFACE_NEW=$INTERFACE"