1
1
mirror of https://github.com/systemd/systemd-stable.git synced 2024-11-01 00:51:08 +03:00
Commit Graph

147 Commits

Author SHA1 Message Date
Kay Sievers
438d4c3cd4 libudev: enumerate - split new() and scan() 2008-09-29 02:00:17 +02:00
Alan Jenkins
034b37c83f udev-test.pl: set non-zero exitcode if tests fail 2008-09-16 10:03:42 -07:00
Kay Sievers
37a123a9bc udev-test.pl: set udev_log="err" 2008-09-08 21:50:17 +02:00
Kay Sievers
e149748850 udev-test.pl: remove left-over comment from --valgrind option 2008-09-03 22:00:55 +02:00
Kay Sievers
e08109cbc8 udev-test.pl: add --valgrind option 2008-09-01 16:20:06 +02:00
Kay Sievers
01618658fd use autotools 2008-07-30 01:45:23 +02:00
Kay Sievers
282988c4f8 move default rules from /etc/udev/rules.d/ to /lib/udev/rules.d/
None of these rules is supposed to be changed by users, so move
them out of /etc. Custom rules, and automatically generated rules
stay in /etc. All rules are still processed in lexical order,
regardless which directory they live in.
2008-07-18 15:56:03 +02:00
Erik van Konijnenburg
ff94cec3d7 add substitution in MODE= field
Do substitition processing in MODE field, similar to substitution in
OWNER, GROUP etc fields.  Add test case for normal and overflow behaviour.
Document in manpage.
2008-05-19 09:05:20 +02:00
Kay Sievers
cf100ca71b allow setting of MODE="0000" 2008-04-18 21:07:29 +02:00
Kay Sievers
0ea5e96edb extend hack to allow TEST=="*/start" 2008-03-14 23:40:06 +01:00
Kay Sievers
03f65fe6a9 accept relative path for TEST 2007-08-16 12:45:31 +02:00
Kay Sievers
19096c087f restore behavior of NAME== 2007-07-25 15:29:14 +02:00
Kay Sievers
1ff1aa424b allow SYMLINK== match 2007-07-16 13:29:28 +02:00
Kay Sievers
4ad47b2de6 add "[$SUBSYSTEM/$KERNEL]<attribute>" lookup 2007-06-03 12:29:46 +02:00
Kay Sievers
c19870519d replace_chars: replace % character 2007-05-21 07:59:40 +02:00
Kay Sievers
864b9b5e37 add test for an attribute which contains an operator char 2007-02-25 01:06:20 +01:00
Kay Sievers
de49bbb223 rename "udev.c" to "test-udev.c" - it is only for testing 2006-12-08 10:29:17 +01:00
Kay Sievers
eef5447934 let $attr{symlink} return the last element of the path
Example for /block/sda:
  SUBSYSTEMS="scsi", ENV{COMMENT}="$attr{driver}"
sets COMMENT=sd
  SUBSYSTEMS="pci", ENV{COMMENT}="$attr{driver}"
sets COMMENT=ata_piix
2006-09-05 02:18:06 +02:00
Kay Sievers
ac528431dd fix ENV{TEST}="Test: $env{TEST}" 2006-09-05 00:50:25 +02:00
Kay Sievers
c4edd0adb5 use new key names in test programs 2006-08-20 19:11:32 +02:00
Kay Sievers
38895e573c skip rule, if too may keys of the same type are used 2006-08-20 18:15:29 +02:00
Kay Sievers
95776dc6ec consistent key naming to match only the event device or include all parent devices
This scheme is more consistent and makes it obvious if a match happens
against the event device only, or the full chain of parent devices.

The old key names are now:
  BUS -> SUBSYSTEMS
  ID -> KERNELS
  SYSFS -> ATTRS
  DRIVER -> DRIVERS

Match keys for the event device:
  KERNEL
  SUBSYSTEM
  ATTR
  DRIVER (in a future release, for now the same as DRIVERS)

Match keys for all devices along the parent device chain:
  KERNELS
  SUBSYSTEMS
  ATTRS
  DRIVERS

ID, BUS, SYSFS are no longer mentioned in the man page but still work.
DRIVER must be converted to DRIVERS to match the new scheme. For now,
an error is logged, if DRIVER is used. In a future release, the DRIVER
key behaviour will change.
2006-08-19 16:06:25 +02:00
Kay Sievers
d4ae9925ee don't report an error on overlong comment lines 2006-08-13 04:23:16 +02:00
Kay Sievers
c8ff4b3db4 remove broken %e enumeration 2006-07-04 12:27:00 +02:00
Kay Sievers
fa33d857e2 don't remove symlinks if they are already there
Consecutive "add" events will not remove and recreate the same symlinks
anymore. No longer valid links, like after changing a filesystem label,
will still be removed.
2006-06-14 16:32:52 +02:00
Kay Sievers
d59c84effd allow NAME=="value" to check for already assigned value 2006-04-24 19:25:55 +02:00
Kay Sievers
36af2ddcb9 don't add $SUBSYSTEM automatically as $1 to programs
Signed-off-by: Kay Sievers <kay.sievers@suse.de>
2006-01-26 04:38:33 +01:00
Kay Sievers
03b24b71e0 fix BUS, ID, $id usage
Signed-off-by: Kay Sievers <kay.sievers@suse.de>
2006-01-16 06:12:49 +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
fc55cf68ca remove "udev_db" option from config file
All udev state is kept in /$udev_root/.udev/ now. No option to
configure that anymore, it will always be there.

Signed-off-by: Kay Sievers <kay.sievers@suse.de>
2005-11-16 04:14:15 +01:00
Kay Sievers
53899a171e fix tests and remove no longer useful stuff
Signed-off-by: Kay Sievers <kay.sievers@suse.de>
2005-11-10 01:50:06 +01:00
Kay Sievers
a8586078fc udev_test.pl: we replace untrusted chars with '_'
Signed-off-by: Kay Sievers <kay.sievers@suse.de>
2005-08-29 02:19:36 +02:00
Kay Sievers
764ce7f2ab start to enforce plain ascii or valid utf8
No device node or symlink can have other characters as plain
readable ascii or valid utf8. The /dev/disk/by-label/* symlinks
can no longer contain weird stuff read from untrusted sources.

Signed-off-by: Kay Sievers <kay.sievers@suse.de>
2005-08-28 15:55:58 +02:00
Kay Sievers
5618b5611b ENV{TEST}=="1" compares and ENV{TEST}="1" sets the environment
This can be uses to export stuff to the event environment or
to carry a state from one rule to another, like enabling/disabling
later rules conditionally.

Signed-off-by: Kay Sievers <kay.sievers@suse.de>
2005-08-16 04:25:20 +02: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
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
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
a72e3f666b fix typo in group assignment
Thanks to: Georgi Georgiev
2005-07-07 22:40:09 +02:00
Kay Sievers
be0856c841 prepare RELEASE-NOTES
Signed-off-by: Kay Sievers <kay.sievers@suse.de>
2005-06-30 21:50:22 +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
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
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
Greg KH
1e50c2dee7 Update permissions on test scripts so they will run properly now.
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2005-05-10 10:22:56 -07:00
tklauser@access.unizh.ch
15139b8a62 [PATCH] fix stupid all_partitions bug
> On Mon, 2005-04-11 at 14:55 +0200, Norbert Preining wrote:
> > On Mon, 11 Apr 2005, Kay Sievers wrote:
> > > > brw-rw----  1 root root 8, 0 2005-04-10 14:58 /dev/sdcard
> > > > brw-rw----  1 root root 8, 1 2005-04-10 14:58 /dev/sdcard1
> > > > brw-rw----  1 root root 8, 1 2005-04-10 14:58 /dev/sdcard2
> > > > brw-rw----  1 root root 8, 1 2005-04-10 14:58 /dev/sdcard3
> > > 
> > > This looks broken.
> > 
> > Good to hear.

Yeah, I guess it's broken. In create_node() in udev_add.c there is
always added 1 to the minor number, thus the error. The attached patch
should fix this.
2005-04-26 23:55:01 -07:00
kay.sievers@vrfy.org
f040a4a271 [PATCH] udev-test.pl: add test for DEVNAME export to RUN environment 2005-04-26 23:55:00 -07: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