1
0
mirror of https://github.com/systemd/systemd.git synced 2024-10-28 20:25:38 +03:00
Commit Graph

47 Commits

Author SHA1 Message Date
Kay Sievers
4937afa402 move some logging to the info level
Signed-off-by: Kay Sievers <kay.sievers@suse.de>
2005-08-11 21:01:46 +02:00
Kay Sievers
27f877e60f allow logging of all output from executed tools
If USE_DEBUG=true and udev_log="debug", all output of the forked
programs to stdout and stderr is send to syslog.

Signed-off-by: Kay Sievers <kay.sievers@suse.de>
2005-08-11 17:32:59 +02:00
Kay Sievers
13d11705bf switch some strlcpy's to memcpy
strlcpy counts the sourec string lengt and is therefore not suitable
to copy a defined length of characters from one string to another.

Signed-off-by: Kay Sievers <kay.sievers@suse.de>
2005-08-08 02:21:55 +02:00
Kay Sievers
738428b449 read sysfs attribute also from parent class device
Signed-off-by: Kay Sievers <kay.sievers@suse.de>
2005-08-05 01:52:57 +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
c609f627fa thread unknown ENV{key} match as empty value
This way we can run a rule if a certain key is not set by:
  ENV{key}="" or ENV{key}!="?*"

Signed-off-by: Kay Sievers <kay.sievers@suse.de>
2005-07-16 05:50:34 +02:00
Anton Farygin
8cf97fb046 fix typo in GROUP value application 2005-07-14 11:39:55 +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
0cd4ac473a allow multiple values to be matched with KEY=="value1|value2"
Signed-off-by: Kay Sievers <kay.sievers@suse.de>
2005-07-12 12:52:56 +02:00
Kay Sievers
ef520ba25f remember mapped rules state
Signed-off-by: Kay Sievers <kay.sievers@suse.de>
2005-07-12 11:42:39 +02:00
Kay Sievers
7b2bdb4b1b fix symlink values separated by multiple spaces
Signed-off-by: Kay Sievers <kay.sievers@suse.de>
2005-07-07 23:43:13 +02:00
Kay Sievers
97c0448d9a update RELEASE-NOTES
Signed-off-by: Kay Sievers <kay.sievers@suse.de>
2005-07-07 23:01:04 +02:00
Kay Sievers
613ffbeb15 fix default-name handling and NAME="" rules
Signed-off-by: Kay Sievers <kay.sievers@suse.de>
2005-07-07 22:32:48 +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
ffd5c68937 allow OPTIONS to be recognized for /sys/modules /sys/devices events
Signed-off-by: Kay Sievers <kay.sievers@suse.de>
2005-07-03 14:31:17 +02:00
Kay Sievers
aaff09a30a add ID_TYPE to the id probers
Export the type of device from ata_id and scsi_id, also strip
leading and trailing whitespace and substitute consecutive
whitespace with a single underline char.

From: Hannes Reinecke <hare@suse.de>
Signed-off-by: Kay Sievers <kay.sievers@suse.de>
2005-06-27 17:04:56 +02:00
Kay Sievers
b8476286d6 store the imported device information in the udevdb
Any program can query with udevinfo for persistent device
attributes evaluated on device discovery now.

Signed-off-by: Kay Sievers <kay.sievers@suse.de>
2005-06-26 18:55:24 +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
be4bedd16b unify execute_command() and execute_program()
Signed-off-by: Kay Sievers <kay.sievers@suse.de>
2005-06-25 15:35:14 +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
995aec8759 udev: clear lists if a new value is assigned
Former values are cleared if SYMLINK=<value> is used. To add a value
SYMLINK+=<value> is now needed.

Signed-off-by: Kay Sievers <kay.sievers@suse.de>
2005-06-05 05:13:33 +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
fb39f0566e [PATCH] move execute_program to utils + add action to init_device 2005-04-26 23:55:00 -07:00
kay.sievers@vrfy.org
7ff56624f8 [PATCH] correct correction for error path for PROGRAM execution 2005-04-26 23:55:00 -07:00
kay.sievers@vrfy.org
584d412bf0 [PATCH] correct error path for PROGRAM execution 2005-04-26 23:55:00 -07:00
kay.sievers@vrfy.org
bb1a77d34c [PATCH] check for strlen()==0 before accessing strlen()-1 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
98bbc835f5 [PATCH] read %s{}-sysfs values at any device in the chain 2005-04-26 23:55:00 -07:00
kay.sievers@vrfy.org
aa341f21eb [PATCH] udev_rules.c: don't change sysfs_device while walking up the device chain 2005-04-26 23:55:00 -07:00
kay.sievers@vrfy.org
18614ab25d [PATCH] remove untrusted chars read from sysfs-values or returned by PROGRAM
Better remove characters that are useless in a device node name.
It may be a security risk to pass any character read from e.g. a
sysfs attribute to a shell script we execute later.
  
Prevent the modification of the libsysfs attribute value
cache.

Clear PROGRAM result if the execution encountered an error.
2005-04-26 23:54:59 -07:00
kay.sievers@vrfy.org
6b493a20e1 [PATCH] support log-priority levels in udev.conf 2005-04-26 23:54:59 -07:00
kay.sievers@vrfy.org
ca4c984cf5 [PATCH] correct rule match for devices without a physical device 2005-04-26 23:53:18 -07:00
kay.sievers@vrfy.org
d6d1a18d72 [PATCH] remove unneeded code, libsysfs does this for us 2005-04-26 23:53:18 -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
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