summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKay Sievers <kay.sievers@vrfy.org>2008-05-26 17:11:13 +0200
committerKay Sievers <kay.sievers@vrfy.org>2008-05-26 17:11:13 +0200
commit941d40a0747a4cbbb306ba597ff02bbbbb49df96 (patch)
tree5a670f886dc34f36aadfa640aeea2dd554bdf87b
parent2e6a862a4d0054e5370074803a6bac06aa0569b3 (diff)
rules: persistent net - handle "locally administered" ibmveth MAC addresses
-rw-r--r--extras/rule_generator/75-persistent-net-generator.rules8
-rw-r--r--udev_rules.c2
2 files changed, 5 insertions, 5 deletions
diff --git a/extras/rule_generator/75-persistent-net-generator.rules b/extras/rule_generator/75-persistent-net-generator.rules
index 2c42de0d78..75b4534af2 100644
--- a/extras/rule_generator/75-persistent-net-generator.rules
+++ b/extras/rule_generator/75-persistent-net-generator.rules
@@ -29,9 +29,6 @@ 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}=""
@@ -44,6 +41,9 @@ SUBSYSTEMS=="usb", ENV{COMMENT}="USB device 0x$attr{idVendor}:0x$attr{idProduct}
SUBSYSTEMS=="pcmcia", ENV{COMMENT}="PCMCIA device $attr{card_id}:$attr{manf_id} ($driver)"
SUBSYSTEMS=="ieee1394", ENV{COMMENT}="Firewire device $attr{host_id})"
+# ibmveth likes to use "locally administered" MAC addresses
+DRIVERS=="ibmveth", ENV{MATCHADDR}="$attr{address}", ENV{COMMENT}="ibmveth ($id)"
+
# S/390 uses id matches only, do not use MAC address match
SUBSYSTEMS=="ccwgroup", ENV{COMMENT}="S/390 $driver device at $id", ENV{MATCHID}="$id", ENV{MATCHDRV}="$driver", ENV{MATCHADDR}=""
@@ -51,7 +51,7 @@ SUBSYSTEMS=="ccwgroup", ENV{COMMENT}="S/390 $driver device at $id", ENV{MATCHID}
ENV{MATCHADDR}=="", ENV{MATCHID}=="", ENV{INTERFACE_NAME}=="", GOTO="persistent_net_generator_end"
# default comment
-ENV{COMMENT}=="", ENV{COMMENT}="$env{SUBSYSTEM} device"
+ENV{COMMENT}=="", ENV{COMMENT}="net device ($attr{driver})"
# write rule
DRIVERS=="?*", IMPORT{program}="write_net_rules"
diff --git a/udev_rules.c b/udev_rules.c
index a102e2da50..ea850a84c3 100644
--- a/udev_rules.c
+++ b/udev_rules.c
@@ -1101,7 +1101,7 @@ static int match_rule(struct udevice *udev, struct udev_rule *rule)
attr_subst_subdir(filename, sizeof(filename));
match = (stat(filename, &statbuf) == 0);
- info("'%s' %s", filename, match ? "exists" : "does not exist\n");
+ info("'%s' %s", filename, match ? "exists\n" : "does not exist\n");
if (match && rule->test_mode_mask > 0) {
match = ((statbuf.st_mode & rule->test_mode_mask) > 0);
info("'%s' has mode=%#o and %s %#o\n", filename, statbuf.st_mode,