Merge branch 'master' into hwdb-bin-file-environment

This commit is contained in:
Boian Bonev 2023-10-01 00:04:32 +03:00 committed by GitHub
commit 5f98fb38c1
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 16 additions and 5 deletions

View File

@ -34,7 +34,10 @@ All device information udev processes is stored in the udev database and sent ou
.SH "RULES FILES"
.PP
The udev rules are read from the files located in the system rules directory
/lib/udev/rules\&.d, the volatile runtime directory
/lib/udev/rules\&.d
(additionally
/usr/lib/udev/rules\&.d
when built with \-\-enable\-split\-usr), the volatile runtime directory
/run/udev/rules\&.d
and the local administration directory
/etc/udev/rules\&.d\&. All rules files are collectively sorted and processed in lexical order, regardless of the directories in which they live\&. However, files with identical filenames replace each other\&. Files in
@ -42,7 +45,9 @@ and the local administration directory
have the highest priority, files in
/run
take precedence over files with the same name in
/lib\&. This can be used to override a system\-supplied rules file with a local file if needed; a symlink in
/lib
(or
/usr/lib)\&. This can be used to override a system\-supplied rules file with a local file if needed; a symlink in
/etc
with the same name as a rules file in
/lib, pointing to

View File

@ -55,15 +55,17 @@
</refsect1>
<refsect1><title>Rules Files</title>
<para>The udev rules are read from the files located in the
system rules directory <filename>/lib/udev/rules.d</filename>,
<para>The udev rules are read from the files located in the system rules
directory <filename>/lib/udev/rules.d</filename> (additionally
<filename>/usr/lib/udev/rules.d</filename> when built with --enable-split-usr),
the volatile runtime directory <filename>/run/udev/rules.d</filename>
and the local administration directory <filename>/etc/udev/rules.d</filename>.
All rules files are collectively sorted and processed in lexical order,
regardless of the directories in which they live. However, files with
identical filenames replace each other. Files in <filename>/etc</filename>
have the highest priority, files in <filename>/run</filename> take precedence
over files with the same name in <filename>/lib</filename>. This can be
over files with the same name in <filename>/lib</filename> (or
<filename>/usr/lib</filename>). This can be
used to override a system-supplied rules file with a local file if needed;
a symlink in <filename>/etc</filename> with the same name as a rules file in
<filename>/lib</filename>, pointing to <filename>/dev/null</filename>,

View File

@ -2602,6 +2602,10 @@ int udev_rules_apply_to_event(struct udev_rules *rules,
case TK_A_RUN_PROGRAM: {
struct udev_list_entry *entry;
if (event->run_final)
break;
if (cur->key.op == OP_ASSIGN_FINAL)
event->run_final = true;
if (cur->key.op == OP_ASSIGN || cur->key.op == OP_ASSIGN_FINAL)
udev_list_cleanup(&event->run_list);
log_debug("RUN '%s' %s:%u",