chiark / gitweb /
rules_generator: add KERNEL=="<netifname>*" to generated rules
[elogind.git] / extras / rule_generator / write_net_rules
index 9b66c93..765e56f 100644 (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"