IF YOU WOULD LIKE TO GET AN ACCOUNT, please write an
email to Administrator. User accounts are meant only to access repo
and report issues and/or generate pull requests.
This is a purpose-specific Git hosting for
BaseALT
projects. Thank you for your understanding!
Только зарегистрированные пользователи имеют доступ к сервису!
Для получения аккаунта, обратитесь к администратору.
This allows us to watch any file to appear, not only sysfs
attributes. Files without a leading slash will be device sysfs
attributes. The key WAIT_FOR_SYSFS still works for backwards
compat, but is removed from the man page.
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.
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.
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>
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>
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>
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"
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>
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>
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>
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>
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.