diff options
author | Kay Sievers <kay.sievers@vrfy.org> | 2007-07-25 18:16:11 +0200 |
---|---|---|
committer | Kay Sievers <kay.sievers@vrfy.org> | 2007-07-25 18:16:11 +0200 |
commit | 9b23e594bf2533b7fadeea1680b186e4775cfe17 (patch) | |
tree | 481b8e3c587e6c93c61cb95a5c99714d87ded8da /extras/rule_generator | |
parent | 49369cafe412e734e174fa3dccd5878499d28702 (diff) |
rules_generator: remove "installation" function
This should be called by triggering events not by looping with
the script itself. It also keeps a second blacklist outside of
the rules which we do not want to maintain.
Diffstat (limited to 'extras/rule_generator')
-rw-r--r-- | extras/rule_generator/75-persistent-net-generator.rules | 1 | ||||
-rw-r--r-- | extras/rule_generator/write_net_rules | 29 |
2 files changed, 2 insertions, 28 deletions
diff --git a/extras/rule_generator/75-persistent-net-generator.rules b/extras/rule_generator/75-persistent-net-generator.rules index 0ff395d136..90d7f82d63 100644 --- a/extras/rule_generator/75-persistent-net-generator.rules +++ b/extras/rule_generator/75-persistent-net-generator.rules @@ -9,6 +9,7 @@ LABEL="persistent_net_generator_do" # build device description string to add a comment the generated rule SUBSYSTEMS=="pci", ENV{COMMENT}="PCI device $attr{vendor}:$attr{device} ($driver)" SUBSYSTEMS=="usb", ENV{COMMENT}="USB device 0x$attr{idVendor}:0x$attr{idProduct} ($driver)" +SUBSYSTEMS=="pcmcia", ENV{COMMENT}="PCMCIA device $attr{card_id}:$attr{manf_id} ($driver)" SUBSYSTEMS=="ccwgroup", ENV{COMMENT}="S/390 $driver device at $id", ENV{NETDEV}="$id", ENV{NETDRV}="$driver" SUBSYSTEMS=="ieee1394", ENV{COMMENT}="Firewire device $attr{host_id})" SUBSYSTEMS=="xen", ENV{COMMENT}="Xen virtual device" diff --git a/extras/rule_generator/write_net_rules b/extras/rule_generator/write_net_rules index e7386b057c..b873b5bf8c 100644 --- a/extras/rule_generator/write_net_rules +++ b/extras/rule_generator/write_net_rules @@ -42,7 +42,7 @@ write_rule() { if [ "$PRINT_HEADER" ]; then PRINT_HEADER= echo "# This file was automatically generated by the $0" - echo "# program, probably run by the persistent-net-generator.rules rules file." + echo "# program run by the persistent-net-generator.rules rules file." echo "#" echo "# You can modify it, as long as you keep each rule on a single line." fi @@ -53,33 +53,6 @@ write_rule() { } >> $RULES_FILE } -# used only if $RULES_FILE is empty, like on installation -if [ "$1" = "all_interfaces" ]; then - if [ -e $RULES_FILE ]; then - printf "$RULES_FILE exists, persistent interface names\nnot saved.\n" >&2 - exit 0 - fi - - if [ ! -e /sys/class/net/ ]; then - echo "/sys/class/net/ is not available, persistent interface names not saved." >&2 - exit 0 - fi - - cd /sys/class/net/ || return 0 - - for INTERFACE in *; do - case $INTERFACE in - eth*|ath*|wlan*|ra*|sta*|ctc*|hsi*) ;; - *) continue ;; - esac - - INTERFACE="$INTERFACE" DEVPATH="/class/net/$INTERFACE" \ - /lib/udev/write_net_rules || true - done - - exit 0 -fi - if [ -z "$INTERFACE" ]; then echo "Missing \$INTERFACE." >&2 exit 1 |