Commit graph

6 commits

Author SHA1 Message Date
Kay Sievers 9bdca442ef rule_generator: fix netif NAME= value extraction regex
$ sed -n -r \
    -e 's/^#.*//' \
    -e 's/[[:space:],]NAME="(eth[0-9]*)"[[:space:]]*(,.*|\\|)$/\1/p' \
    /dev/null /etc/udev/rules.d/70-persistent-net.rules
  SUBSYSTEM=="net", ACTION=="add", DRIVERS=="?*", ATTR{address}=="00:16:41:e2:8d:c7", ATTR{type}=="1", KERNEL=="eth*",eth4

  $ sed -n -r \
    -e 's/^#.*//' \
    -e 's/.*[[:space:],]NAME="(eth[0-9]*)".*/\1/p' \
    /dev/null /etc/udev/rules.d/70-persistent-net.rules
  eth4
2008-10-23 15:44:34 +02:00
Marco d'Itri 0837c28e9b rules_generator: fix write_cd_rules when similar names exist in the root directory
The argument to find_all_rules must be quoted or it will be subject to
shell expansion, which will happen if in the root directory there are
mount points with the same base name.
See http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=407738 for details.
2007-08-07 10:39:07 +02:00
Marco d'Itri 14e1e49484 rules_generator: remove policy from write_cd_rules
The decision about when to create by-id or by-path persistent rules should
be made in the generator rules file where it's obvious and easy to modify
locally, not in the script.
2007-08-07 10:37:58 +02:00
Matthias Schwarzott 491a6a71ff write_cd_rules: set default link type to "by-id" for usb and ieee1394 devices 2007-03-22 21:05:56 +01:00
Marco d'Itri 64e6d9dd70 write_cd_rules: identity-based persistence
Bryan Kadzban wrote:
> Marco d'Itri wrote:
> > Bryan Kadzban wrote:
> >
> > > This is a sort of follow-up of my path-based persistence patch for
> > > net devices; it's the opposite type of addition for CD symlinks.
> >
> > Looks good. I am attaching a slightly reformatted version, I think it
> > should be applied.
>
> That's probably a lot more clear than my version anyway: what you posted
> looks like it does basically the same thing, just with some changes in
> the order and sense of checks.
2006-11-27 10:34:43 +01:00
Marco d'Itri fbcbf70bb2 add persistent rules generator for net devices and optical drives 2006-09-05 15:20:28 +02:00