Commit graph

28 commits

Author SHA1 Message Date
Kay Sievers 8912051213 remove MODALIAS key and substitution 2006-06-07 16:00:34 +02:00
Kay Sievers a9bd2ed84a rename apply_format() cause it is public now
Signed-off-by: Kay Sievers <kay.sievers@suse.de>
2006-01-25 01:28:31 +01:00
Andrey Borzenkov f5f0c34f6d substitute format chars in RUN after rule matching
Apply substitutions before running a program, not while the rule
is parsed. It allows to use environment variables set during rule
processing as command arguments.
2006-01-24 20:10:48 +01:00
Kay Sievers 1aa1e24848 replace libsysfs
We never used any of the libsysfs convenience features. Here we replace
it completely with 300 lines of code, which are much simpler and a bit
faster cause udev(d) does not open any syfs file for a simple event which
does not need any parent device information.

Signed-off-by: Kay Sievers <kay.sievers@suse.de>
2006-01-09 21:18:00 +01:00
Kay Sievers 287814b23c remove precompiled rules option
It was a workaround for speed up udev "coldplug", where ~800 events
happened a second time during bootup. No need for it with the rules
aleady parsed in the daemon.

Signed-off-by: Kay Sievers <kay.sievers@suse.de>
2005-11-05 20:00:31 +01:00
Kay Sievers bfd1294892 add flag for reading of precompiled rules
Rules can be precompiled and stored on disk for initramfs, to avoid
parsing the rules with every event again and again. Also the OWNER and
GROUP names are already resolved to numerical values in the compiled
rules. This flag is used for the upcoming move of the rules parsing
into udevd:
  If the real root is mounted udevd is started and parses the rules
  only once. The event processes will inherit the already parsed rules
  from the daemon, so we want to ignore any precompiled rules and
  use the real rules files and watch the filesystem for changes to
  reload the rules automatically.

Signed-off-by: Kay Sievers <kay.sievers@suse.de>
2005-08-08 17:43:42 +02:00
Kay Sievers e8d569b414 move code to its own files
Signed-off-by: Kay Sievers <kay.sievers@suse.de>
2005-07-22 12:35:58 -04:00
Kay Sievers 761e5b476f make SYSFS{} usable for all devices
Patch from:
  Hannes Reinecke <hare@suse.de>
2005-07-20 12:12:56 -04:00
Kay Sievers 594dd61025 allow rules to have labels and skip to next label
This will allow us to have whole blocks of rules to skip
conditionally. The following section creates the node "yes":
  GOTO="TEST"
  NAME="no"
  NAME="no2", LABEL="NO"
  NAME="yes", LABEL="TEST"
  NAME="no3"
2005-07-16 07:46:31 +02:00
Kay Sievers 0bfb84e1ed IMPORT: add {parent} to import the persistent data of the parent device
Signed-off-by: Kay Sievers <kay.sievers@suse.de>
2005-07-12 14:46:36 +02:00
Kay Sievers b2fe4b9ac9 add WAIT_FOR_SYSFS key to loop until a file in sysfs arrives
Signed-off-by: Kay Sievers <kay.sievers@suse.de>
2005-07-07 20:05:51 +02:00
Kay Sievers 8bd41f36f7 pack parsed rules list
This cuts down our 600 rules file to 98 kb instead of 1.9 Mb memory
or file-size with precompiled rules.

Signed-off-by: Kay Sievers <kay.sievers@suse.de>
2005-07-05 15:24:41 +02:00
Kay Sievers 6369839195 replace useless defines by inline text
Signed-off-by: Kay Sievers <kay.sievers@suse.de>
2005-07-04 20:42:04 +02:00
Kay Sievers a0e5382d66 move rule matches to function
Signed-off-by: Kay Sievers <kay.sievers@suse.de>
2005-07-04 19:44:25 +02:00
Kay Sievers 319c670016 IMPORT allow to import program returned keys into the env
Signed-off-by: Kay Sievers <kay.sievers@suse.de>
2005-06-25 18:58:49 +02:00
Kay Sievers bd0ed2ffbe IMPORT=<file> allow to import a shell-var style config-file
This allows to source-in a file into the udev environment to have
the defined keys available for later processing by udev itself or
the forked helper programs.

Signed-off-by: Kay Sievers <kay.sievers@suse.de>
2005-06-25 13:10:16 +02:00
Kay Sievers 6bf0ffe8fd allow rules to be compiled to one binary file
All the rule files can be compiled into a single file,
which can be mapped into the udev process to avoid parsing
the rules with every event.

Signed-off-by: Kay Sievers <kay.sievers@suse.de>
2005-06-24 18:05:32 +02:00
Kay Sievers bf5d296473 prepare for module loading rules and add MODALIAS key
Signed-off-by: Kay Sievers <kay.sievers@suse.de>
2005-06-20 00:29:38 +02:00
Kay Sievers c07669bd66 udev: handle all events - not only class and block devices
Handle all events with rules. If udev is expected to handle hotplug.d/
the exernal helper must be called.

Signed-off-by: Kay Sievers <kay.sievers@suse.de>
2005-06-05 15:55:29 +02:00
Kay Sievers c974742bf4 udev: allow final assignments :=
The use of KEY:=<value> will make the key unchangeable by later rules.

Signed-off-by: Kay Sievers <kay.sievers@suse.de>
2005-06-05 04:57:03 +02:00
kay.sievers@vrfy.org 821d0ec803 [PATCH] add RUN key to be able to run rule based notification
SUBSYSTEM=="block", RUN="/sbin/program"
  will execute the program only for block device events.

ACTION="remove", SUBSYSTEM=="block", RUN"/sbin/program"
  will execute the program, if a block device is removed.
2005-04-26 23:55:00 -07:00
kay.sievers@vrfy.org db949b0248 [PATCH] allow to match against empty key values 2005-04-26 23:55:00 -07:00
kay.sievers@vrfy.org 3e5958dee5 [PATCH] add ENV{} key to match agains environment variables 2005-04-26 23:53:18 -07:00
kay.sievers@vrfy.org 79f651f4bd [PATCH] simplify sysfs_pair handling 2005-04-26 23:53:18 -07:00
kay.sievers@vrfy.org 38285d23d7 [PATCH] add a test and simplify debug statement 2005-04-26 23:53:17 -07:00
kay.sievers@vrfy.org 28ce66de17 [PATCH] support =, ==, !=, += for the key match and assignment 2005-04-26 23:53:17 -07:00
kay.sievers@vrfy.org 3b6ed8bb06 [PATCH] add OPTION="last_rule" to skip any later rule 2005-04-26 23:53:17 -07:00
kay.sievers@vrfy.org e5e322bc62 [PATCH] rename namedev_dev to udev_rule 2005-04-26 23:53:17 -07:00
Renamed from namedev.h (Browse further)