diff options
author | Kay Sievers <kay.sievers@vrfy.org> | 2008-04-15 00:21:51 +0200 |
---|---|---|
committer | Kay Sievers <kay.sievers@vrfy.org> | 2008-04-15 00:21:51 +0200 |
commit | e6d70ed63a03f39de148e6b0afb47cbbc5ec78eb (patch) | |
tree | 9a94b72d7baf067ce55e81ee8330c8823262d958 /extras/rule_generator | |
parent | 798d7ab60c476a2c7bcef6918a40dce1756204d1 (diff) |
rules_generator: net rules - always add KERNEL== match to generated rules
Diffstat (limited to 'extras/rule_generator')
-rw-r--r-- | extras/rule_generator/75-persistent-net-generator.rules | 2 | ||||
-rw-r--r-- | extras/rule_generator/write_net_rules | 5 |
2 files changed, 4 insertions, 3 deletions
diff --git a/extras/rule_generator/75-persistent-net-generator.rules b/extras/rule_generator/75-persistent-net-generator.rules index 2aa3076a59..85a4c5b55b 100644 --- a/extras/rule_generator/75-persistent-net-generator.rules +++ b/extras/rule_generator/75-persistent-net-generator.rules @@ -18,7 +18,7 @@ SUBSYSTEM!="net", GOTO="persistent_net_generator_end" NAME=="?*", GOTO="persistent_net_generator_end" # device name whitelist -KERNEL!="eth*|ath*|wlan*[0-9]|ra*|sta*|ctc*|lcs*|hsi*", GOTO="persistent_net_generator_end" +KERNEL!="eth*|ath*|wlan*[0-9]|msh*|ra*|sta*|ctc*|lcs*|hsi*", GOTO="persistent_net_generator_end" # ignore Xen virtual interfaces SUBSYSTEMS=="xen", GOTO="persistent_net_generator_end" diff --git a/extras/rule_generator/write_net_rules b/extras/rule_generator/write_net_rules index 765e56f6d3..322398bce4 100644 --- a/extras/rule_generator/write_net_rules +++ b/extras/rule_generator/write_net_rules @@ -92,6 +92,9 @@ if [ -z "$match" ]; then exit 1 fi +basename=${INTERFACE%%[0-9]*} +match="$match, KERNEL==\"$basename*\"" + if [ "$INTERFACE_NAME" ]; then # external tools may request a custom name COMMENT="$COMMENT (custom name provided by external tool)" @@ -101,8 +104,6 @@ if [ "$INTERFACE_NAME" ]; then fi 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" |