* Re: DEVLINKS and DEVNAME variables in RUN rules
2006-01-24 16:24 DEVLINKS and DEVNAME variables in RUN rules Olivier Blin
@ 2006-01-24 18:05 ` Andrey Borzenkov
2006-01-24 19:43 ` Kay Sievers
` (7 subsequent siblings)
8 siblings, 0 replies; 10+ messages in thread
From: Andrey Borzenkov @ 2006-01-24 18:05 UTC (permalink / raw)
To: linux-hotplug
[-- Attachment #1.1: Type: text/plain, Size: 1427 bytes --]
On Tuesday 24 January 2006 19:24, Olivier Blin wrote:
> Hi,
>
> I'd like to use the DEVNAME and DEVLINKS (thanks Kay) environment
> variables in a RUN rule. Unfortunately, they're not exported yet when
> the command to be executed is computed (i.e. when the format is
> applied). So, for now, I'm using a dumb trick:
> RUN+="/bin/sh -c '/sbin/pam_console_setowner $$DEVICE $$DEVNAME
> $$DEVLINKS'"
>
> Would it be possible to have the format applied right before the RUN
> command is run?
>
Like this? This seems to work for me:
Jan 24 21:04:24 cooker udevd-event[16049]: name_list_add: adding
'/sbin/pam_console_setowner $env{DEVICE} $env{DEVNAME} $env{DEVLINKS}'
Jan 24 21:04:25 cooker udevd-event[16049]: apply_format: format=14,
string='/sbin/pam_console_setowner ', tail=' $env{DEVNAME} $env{DEVLINKS}'
Jan 24 21:04:25 cooker udevd-event[16049]: apply_format: format=14,
string='/sbin/pam_console_setowner ', tail=' $env{DEVLINKS}'
Jan 24 21:04:25 cooker udevd-event[16049]: apply_format: format=14,
string='/sbin/pam_console_setowner /dev/adsp ', tail=''
Jan 24 21:04:25 cooker udevd-event[16049]: run_program: arg[0]
'/sbin/pam_console_setowner'
Jan 24 21:04:25 cooker udevd-event[16049]: run_program:
'/sbin/pam_console_setowner /dev/adsp /dev/sound/adsp'
Jan 24 21:04:25 cooker udevd-event[16049]: run_program:
'/sbin/pam_console_setowner' returned with status 0
-andrey
[-- Attachment #1.2: 0001-Allow-substitution-of-environment-variables-in-RUN-commands.txt --]
[-- Type: text/plain, Size: 4123 bytes --]
Subject: [PATCH] Allow substitution of environment variables in RUN commands
Apply substitutions immediately before running program, not when rule
is parsed. It allows use environment variables set by udev during
rule processing as command arguments.
---
udev.c | 9 +++++++--
udev_rules.c | 3 +--
udev_rules.h | 2 +-
udevd.c | 9 +++++++--
udevstart.c | 9 +++++++--
5 files changed, 23 insertions(+), 9 deletions(-)
c1d4190501d381ac2d6987e84b680907c93c0b4d
diff --git a/udev.c b/udev.c
index 4762ab1..f808abf 100644
--- a/udev.c
+++ b/udev.c
@@ -161,8 +161,13 @@ int main(int argc, char *argv[], char *e
list_for_each_entry(name_loop, &udev->run_list, node) {
if (strncmp(name_loop->name, "socket:", strlen("socket:")) == 0)
pass_env_to_socket(&name_loop->name[strlen("socket:")], devpath, action);
- else
- run_program(name_loop->name, udev->dev->subsystem, NULL, 0, NULL, (udev_log_priority >= LOG_INFO));
+ else {
+ char program[PATH_SIZE];
+
+ strlcpy(program, name_loop->name, sizeof(program));
+ apply_format(udev, program, sizeof(program));
+ run_program(program, udev->dev->subsystem, NULL, 0, NULL, (udev_log_priority >= LOG_INFO));
+ }
}
}
diff --git a/udev_rules.c b/udev_rules.c
index e9d8d75..fbcbbe0 100644
--- a/udev_rules.c
+++ b/udev_rules.c
@@ -362,7 +362,7 @@ static int wait_for_sysfs(struct udevice
return -1;
}
-static void apply_format(struct udevice *udev, char *string, size_t maxsize)
+void apply_format(struct udevice *udev, char *string, size_t maxsize)
{
char temp[PATH_SIZE];
char temp2[PATH_SIZE];
@@ -1017,7 +1017,6 @@ int udev_rules_get_name(struct udev_rule
name_list_cleanup(&udev->run_list);
}
strlcpy(program, key_val(rule, &rule->run), sizeof(program));
- apply_format(udev, program, sizeof(program));
dbg("add run '%s'", program);
name_list_add(&udev->run_list, program, 0);
}
diff --git a/udev_rules.h b/udev_rules.h
index 125babf..b183d9b 100644
--- a/udev_rules.h
+++ b/udev_rules.h
@@ -105,7 +105,7 @@ struct udev_rules {
extern int udev_rules_init(struct udev_rules *rules, int resolve_names);
extern void udev_rules_cleanup(struct udev_rules *rules);
-extern void udev_apply_format(struct udevice *udev, char *string, size_t maxsize);
+extern void apply_format(struct udevice *udev, char *string, size_t maxsize);
extern void udev_rules_iter_init(struct udev_rules *rules);
extern struct udev_rule *udev_rules_iter_next(struct udev_rules *rules);
diff --git a/udevd.c b/udevd.c
index c45d3a4..af5685c 100644
--- a/udevd.c
+++ b/udevd.c
@@ -123,10 +123,15 @@ static int udev_event_process(struct uev
list_for_each_entry(name_loop, &udev->run_list, node) {
if (strncmp(name_loop->name, "socket:", strlen("socket:")) == 0)
pass_env_to_socket(&name_loop->name[strlen("socket:")], msg->devpath, msg->action);
- else
- if (run_program(name_loop->name, udev->dev->subsystem, NULL, 0, NULL,
+ else {
+ char program[PATH_SIZE];
+
+ strlcpy(program, name_loop->name, sizeof(program));
+ apply_format(udev, program, sizeof(program));
+ if (run_program(program, udev->dev->subsystem, NULL, 0, NULL,
(udev_log_priority >= LOG_INFO)))
retval = -1;
+ }
}
}
diff --git a/udevstart.c b/udevstart.c
index 8c414f1..11bdf79 100644
--- a/udevstart.c
+++ b/udevstart.c
@@ -160,8 +160,13 @@ run:
list_for_each_entry(name_loop, &udev->run_list, node) {
if (strncmp(name_loop->name, "socket:", strlen("socket:")) == 0)
pass_env_to_socket(&name_loop->name[strlen("socket:")], udev->dev->devpath, "add");
- else
- run_program(name_loop->name, udev->dev->subsystem, NULL, 0, NULL, (udev_log_priority >= LOG_INFO));
+ else {
+ char program[PATH_SIZE];
+
+ strlcpy(program, name_loop->name, sizeof(program));
+ apply_format(udev, program, sizeof(program));
+ run_program(program, udev->dev->subsystem, NULL, 0, NULL, (udev_log_priority >= LOG_INFO));
+ }
}
}
exit:
--
1.1.4
[-- Attachment #2: Type: application/pgp-signature, Size: 189 bytes --]
^ permalink raw reply related [flat|nested] 10+ messages in thread* Re: DEVLINKS and DEVNAME variables in RUN rules
2006-01-24 16:24 DEVLINKS and DEVNAME variables in RUN rules Olivier Blin
2006-01-24 18:05 ` Andrey Borzenkov
@ 2006-01-24 19:43 ` Kay Sievers
2006-01-25 18:18 ` Andrey Borzenkov
` (6 subsequent siblings)
8 siblings, 0 replies; 10+ messages in thread
From: Kay Sievers @ 2006-01-24 19:43 UTC (permalink / raw)
To: linux-hotplug
On Tue, Jan 24, 2006 at 09:05:51PM +0300, Andrey Borzenkov wrote:
> On Tuesday 24 January 2006 19:24, Olivier Blin wrote:
> > I'd like to use the DEVNAME and DEVLINKS (thanks Kay) environment
> > variables in a RUN rule. Unfortunately, they're not exported yet when
> > the command to be executed is computed (i.e. when the format is
> > applied). So, for now, I'm using a dumb trick:
> > RUN+="/bin/sh -c '/sbin/pam_console_setowner $$DEVICE $$DEVNAME
> > $$DEVLINKS'"
> >
> > Would it be possible to have the format applied right before the RUN
> > command is run?
> >
>
> Like this? This seems to work for me:
>
> Jan 24 21:04:24 cooker udevd-event[16049]: name_list_add: adding
> '/sbin/pam_console_setowner $env{DEVICE} $env{DEVNAME} $env{DEVLINKS}'
Applied.
Thanks,
Kay
-------------------------------------------------------
This SF.net email is sponsored by: Splunk Inc. Do you grep through log files
for problems? Stop! Download the new AJAX search engine that makes
searching your log files as easy as surfing the web. DOWNLOAD SPLUNK!
http://sel.as-us.falkag.net/sel?cmd=lnk&kid\x103432&bid#0486&dat\x121642
_______________________________________________
Linux-hotplug-devel mailing list http://linux-hotplug.sourceforge.net
Linux-hotplug-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/linux-hotplug-devel
^ permalink raw reply [flat|nested] 10+ messages in thread* Re: DEVLINKS and DEVNAME variables in RUN rules
2006-01-24 16:24 DEVLINKS and DEVNAME variables in RUN rules Olivier Blin
2006-01-24 18:05 ` Andrey Borzenkov
2006-01-24 19:43 ` Kay Sievers
@ 2006-01-25 18:18 ` Andrey Borzenkov
2006-01-25 18:25 ` Olivier Blin
` (5 subsequent siblings)
8 siblings, 0 replies; 10+ messages in thread
From: Andrey Borzenkov @ 2006-01-25 18:18 UTC (permalink / raw)
To: linux-hotplug
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
On Tuesday 24 January 2006 22:43, Kay Sievers wrote:
> On Tue, Jan 24, 2006 at 09:05:51PM +0300, Andrey Borzenkov wrote:
> > On Tuesday 24 January 2006 19:24, Olivier Blin wrote:
> > > I'd like to use the DEVNAME and DEVLINKS (thanks Kay) environment
> > > variables in a RUN rule. Unfortunately, they're not exported yet when
> > > the command to be executed is computed (i.e. when the format is
> > > applied). So, for now, I'm using a dumb trick:
> > > RUN+="/bin/sh -c '/sbin/pam_console_setowner $$DEVICE $$DEVNAME
> > > $$DEVLINKS'"
> > >
> > > Would it be possible to have the format applied right before the RUN
> > > command is run?
> >
> > Like this? This seems to work for me:
> >
> > Jan 24 21:04:24 cooker udevd-event[16049]: name_list_add: adding
> > '/sbin/pam_console_setowner $env{DEVICE} $env{DEVNAME} $env{DEVLINKS}'
>
> Applied.
>
OK the following patch documents this difference (and the fact that RUN is
using substitutons at all). I am still curious if there is real life use for
something like `PROGRAM="check" RUN="callout %c{1}"'.
regards
- -andrey
Subject: [PATCH] Document when substitutions are applied for RUN and other
keys
Signed-off-by: Andrey Borzenkov <arvidjaar@mail.ru>
- ---
udev.8 | 11 ++++++++---
1 files changed, 8 insertions(+), 3 deletions(-)
333ee12327b6792c9ba7cb75e89786cd8d5a171c
diff --git a/udev.8 b/udev.8
index 8eb63c2..675bb7e 100644
- --- a/udev.8
+++ b/udev.8
@@ -164,10 +164,15 @@ The
\fBNAME\fR,
\fBSYMLINK\fR,
\fBPROGRAM\fR,
- -\fBOWNER\fR
- -and
+\fBOWNER\fR,
\fBGROUP\fR
- -fields support simple printf\-like string substitutions:
+and
+\fBRUN\fR
+fields support simple printf\-like string substitutions. For \fBRUN\fR they
+are applied immediately before program is launched, after all rules have
+been processed. It allows use of complete environment set up by earlier rules
+including exported variables. For all other fields substitutions are applied
+when rule is being processed. The supported substitutions are:
.TP
\fB$kernel\fR, \fB%k\fR
The kernel name for this device.
- --
1.1.4
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.2 (GNU/Linux)
iD8DBQFD18D1R6LMutpd94wRAqMgAJ9DVxZeZ5OFjIfPm8kWVEt8auVX9ACfbBod
UwcVMW+MOoKSBfsbjP8+Ugs÷pb
-----END PGP SIGNATURE-----
-------------------------------------------------------
This SF.net email is sponsored by: Splunk Inc. Do you grep through log files
for problems? Stop! Download the new AJAX search engine that makes
searching your log files as easy as surfing the web. DOWNLOAD SPLUNK!
http://sel.as-us.falkag.net/sel?cmd=lnk&kid\x103432&bid#0486&dat\x121642
_______________________________________________
Linux-hotplug-devel mailing list http://linux-hotplug.sourceforge.net
Linux-hotplug-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/linux-hotplug-devel
^ permalink raw reply [flat|nested] 10+ messages in thread* Re: DEVLINKS and DEVNAME variables in RUN rules
2006-01-24 16:24 DEVLINKS and DEVNAME variables in RUN rules Olivier Blin
` (2 preceding siblings ...)
2006-01-25 18:18 ` Andrey Borzenkov
@ 2006-01-25 18:25 ` Olivier Blin
2006-01-25 18:52 ` Kay Sievers
` (4 subsequent siblings)
8 siblings, 0 replies; 10+ messages in thread
From: Olivier Blin @ 2006-01-25 18:25 UTC (permalink / raw)
To: linux-hotplug
Kay Sievers <kay.sievers@vrfy.org> writes:
> On Tue, Jan 24, 2006 at 09:05:51PM +0300, Andrey Borzenkov wrote:
>> On Tuesday 24 January 2006 19:24, Olivier Blin wrote:
>> > I'd like to use the DEVNAME and DEVLINKS (thanks Kay) environment
>> > variables in a RUN rule. Unfortunately, they're not exported yet when
>> > the command to be executed is computed (i.e. when the format is
>> > applied). So, for now, I'm using a dumb trick:
>> > RUN+="/bin/sh -c '/sbin/pam_console_setowner $$DEVICE $$DEVNAME
>> > $$DEVLINKS'"
>> >
>> > Would it be possible to have the format applied right before the RUN
>> > command is run?
>> >
>>
>> Like this? This seems to work for me:
>>
>> Jan 24 21:04:24 cooker udevd-event[16049]: name_list_add: adding
>> '/sbin/pam_console_setowner $env{DEVICE} $env{DEVNAME} $env{DEVLINKS}'
>
> Applied.
Thanks (and spasiba)!
By the way, is there any place where this new 082 release has been
announced?
--
Olivier Blin - Mandriva
-------------------------------------------------------
This SF.net email is sponsored by: Splunk Inc. Do you grep through log files
for problems? Stop! Download the new AJAX search engine that makes
searching your log files as easy as surfing the web. DOWNLOAD SPLUNK!
http://sel.as-us.falkag.net/sel?cmd=lnk&kid\x103432&bid#0486&dat\x121642
_______________________________________________
Linux-hotplug-devel mailing list http://linux-hotplug.sourceforge.net
Linux-hotplug-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/linux-hotplug-devel
^ permalink raw reply [flat|nested] 10+ messages in thread* Re: DEVLINKS and DEVNAME variables in RUN rules
2006-01-24 16:24 DEVLINKS and DEVNAME variables in RUN rules Olivier Blin
` (3 preceding siblings ...)
2006-01-25 18:25 ` Olivier Blin
@ 2006-01-25 18:52 ` Kay Sievers
2006-01-25 19:03 ` Andrey Borzenkov
` (3 subsequent siblings)
8 siblings, 0 replies; 10+ messages in thread
From: Kay Sievers @ 2006-01-25 18:52 UTC (permalink / raw)
To: linux-hotplug
On Wed, Jan 25, 2006 at 09:18:28PM +0300, Andrey Borzenkov wrote:
> On Tuesday 24 January 2006 22:43, Kay Sievers wrote:
> > On Tue, Jan 24, 2006 at 09:05:51PM +0300, Andrey Borzenkov wrote:
> > > On Tuesday 24 January 2006 19:24, Olivier Blin wrote:
> > > > I'd like to use the DEVNAME and DEVLINKS (thanks Kay) environment
> > > > variables in a RUN rule. Unfortunately, they're not exported yet when
> > > > the command to be executed is computed (i.e. when the format is
> > > > applied). So, for now, I'm using a dumb trick:
> > > > RUN+="/bin/sh -c '/sbin/pam_console_setowner $$DEVICE $$DEVNAME
> > > > $$DEVLINKS'"
> > > >
> > > > Would it be possible to have the format applied right before the RUN
> > > > command is run?
> > >
> > > Like this? This seems to work for me:
> > >
> > > Jan 24 21:04:24 cooker udevd-event[16049]: name_list_add: adding
> > > '/sbin/pam_console_setowner $env{DEVICE} $env{DEVNAME} $env{DEVLINKS}'
> >
> > Applied.
> >
>
> OK the following patch documents this difference (and the fact that RUN is
> using substitutons at all). I am still curious if there is real life use for
> something like `PROGRAM="check" RUN="callout %c{1}"'.
Oh, the %c will just be the last result if more than one rule uses
PROGRAM and should still work in almost all cases it is used, if at all.
The man page is generated from the xml source in docs/ and we can't patch
the man page itself and udev 082 has udev.8 moved to udev.7, cause the
command udev does no longer really exist. Can you patch the udev.xml
instead?
Thanks,
Kay
-------------------------------------------------------
This SF.net email is sponsored by: Splunk Inc. Do you grep through log files
for problems? Stop! Download the new AJAX search engine that makes
searching your log files as easy as surfing the web. DOWNLOAD SPLUNK!
http://sel.as-us.falkag.net/sel?cmd=lnk&kid\x103432&bid#0486&dat\x121642
_______________________________________________
Linux-hotplug-devel mailing list http://linux-hotplug.sourceforge.net
Linux-hotplug-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/linux-hotplug-devel
^ permalink raw reply [flat|nested] 10+ messages in thread* Re: DEVLINKS and DEVNAME variables in RUN rules
2006-01-24 16:24 DEVLINKS and DEVNAME variables in RUN rules Olivier Blin
` (4 preceding siblings ...)
2006-01-25 18:52 ` Kay Sievers
@ 2006-01-25 19:03 ` Andrey Borzenkov
2006-01-25 19:10 ` Kay Sievers
` (2 subsequent siblings)
8 siblings, 0 replies; 10+ messages in thread
From: Andrey Borzenkov @ 2006-01-25 19:03 UTC (permalink / raw)
To: linux-hotplug
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
On Wednesday 25 January 2006 21:18, Andrey Borzenkov wrote:
>
> OK the following patch documents this difference (and the fact that RUN is
> using substitutons at all).
oops, messed up with git and did not received updates. Here it is against 082.
- -andrey
Subject: [PATCH] Document when substitutions are applied for RUN and other
keys
From: Andrey Borzenkov <arvidjaar@mail.ru>
Signed-off-by: Andrey Borzenkov <arvidjaar@mail.ru>
- ---
udev.7 | 11 ++++++++---
1 files changed, 8 insertions(+), 3 deletions(-)
diff --git a/udev.7 b/udev.7
index a7e2f5a..f557698 100644
- --- a/udev.7
+++ b/udev.7
@@ -164,10 +164,15 @@ The
\fBNAME\fR,
\fBSYMLINK\fR,
\fBPROGRAM\fR,
- -\fBOWNER\fR
- -and
+\fBOWNER\fR,
\fBGROUP\fR
- -fields support simple printf\-like string substitutions:
+and
+\fBRUN\fR
+fields support simple printf\-like string substitutions. For \fBRUN\fR they
+are applied immediately before program is launched, after all rules have
+been processed. It allows use of complete environment set up by earlier rules
+including exported variables. For all other fields substitutions are applied
+when rule is being processed. The supported substitutions are:
.TP
\fB$kernel\fR, \fB%k\fR
The kernel name for this device.
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.2 (GNU/Linux)
iD8DBQFD18uIR6LMutpd94wRAkP5AJ0TYQML1hwbGSSfyxlUV61cSwTcAQCbBDoY
GFvHdLzdNgQH5ZJqiIaJ2sg=Zh6P
-----END PGP SIGNATURE-----
-------------------------------------------------------
This SF.net email is sponsored by: Splunk Inc. Do you grep through log files
for problems? Stop! Download the new AJAX search engine that makes
searching your log files as easy as surfing the web. DOWNLOAD SPLUNK!
http://sel.as-us.falkag.net/sel?cmd=lnk&kid\x103432&bid#0486&dat\x121642
_______________________________________________
Linux-hotplug-devel mailing list http://linux-hotplug.sourceforge.net
Linux-hotplug-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/linux-hotplug-devel
^ permalink raw reply [flat|nested] 10+ messages in thread* Re: DEVLINKS and DEVNAME variables in RUN rules
2006-01-24 16:24 DEVLINKS and DEVNAME variables in RUN rules Olivier Blin
` (5 preceding siblings ...)
2006-01-25 19:03 ` Andrey Borzenkov
@ 2006-01-25 19:10 ` Kay Sievers
2006-01-25 19:38 ` Andrey Borzenkov
2006-01-26 1:18 ` Kay Sievers
8 siblings, 0 replies; 10+ messages in thread
From: Kay Sievers @ 2006-01-25 19:10 UTC (permalink / raw)
To: linux-hotplug
On Wed, Jan 25, 2006 at 10:03:18PM +0300, Andrey Borzenkov wrote:
> On Wednesday 25 January 2006 21:18, Andrey Borzenkov wrote:
> >
> > OK the following patch documents this difference (and the fact that RUN is
> > using substitutons at all).
>
> oops, messed up with git and did not received updates. Here it is against 082.
> diff --git a/udev.7 b/udev.7
> index a7e2f5a..f557698 100644
> --- a/udev.7
> +++ b/udev.7
Hehe, no, as mentioned in the last mail, we can't patch the created man
page, it comes from "docs/udev.xml". Just edit this file and run "make"
and it will create the man page from the docbook source again.
I don't mind putting it in there myself, but if you want to send a new
patch, go for it. :)
Thanks,
Kay
-------------------------------------------------------
This SF.net email is sponsored by: Splunk Inc. Do you grep through log files
for problems? Stop! Download the new AJAX search engine that makes
searching your log files as easy as surfing the web. DOWNLOAD SPLUNK!
http://sel.as-us.falkag.net/sel?cmd=lnk&kid\x103432&bid#0486&dat\x121642
_______________________________________________
Linux-hotplug-devel mailing list http://linux-hotplug.sourceforge.net
Linux-hotplug-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/linux-hotplug-devel
^ permalink raw reply [flat|nested] 10+ messages in thread* Re: DEVLINKS and DEVNAME variables in RUN rules
2006-01-24 16:24 DEVLINKS and DEVNAME variables in RUN rules Olivier Blin
` (6 preceding siblings ...)
2006-01-25 19:10 ` Kay Sievers
@ 2006-01-25 19:38 ` Andrey Borzenkov
2006-01-26 1:18 ` Kay Sievers
8 siblings, 0 replies; 10+ messages in thread
From: Andrey Borzenkov @ 2006-01-25 19:38 UTC (permalink / raw)
To: linux-hotplug
[-- Attachment #1.1: Type: text/plain, Size: 459 bytes --]
On Wednesday 25 January 2006 22:10, Kay Sievers wrote:
> Hehe, no, as mentioned in the last mail,
too late :)
> we can't patch the created man
> page, it comes from "docs/udev.xml".
Why is it verion-controlled then?
> I don't mind putting it in there myself, but if you want to send a new
> patch, go for it. :)
third attempt. I do not mind, I practice (st-)git on your expense :) This time
attached due to overly long lines.
-andrey
[-- Attachment #1.2: document_subst_rules.diff --]
[-- Type: text/x-diff, Size: 1361 bytes --]
Subject: [PATCH] Document when substitutions are applied for RUN and other keys
From: Andrey Borzenkov <arvidjaar@mail.ru>
Signed-off-by: Andrey Borzenkov <arvidjaar@mail.ru>
---
docs/udev.xml | 9 +++++++--
1 files changed, 7 insertions(+), 2 deletions(-)
diff --git a/docs/udev.xml b/docs/udev.xml
index 7e29077..c94bdcd 100644
--- a/docs/udev.xml
+++ b/docs/udev.xml
@@ -353,8 +353,13 @@
</variablelist>
<para>The <option>NAME</option>, <option>SYMLINK</option>, <option>PROGRAM</option>,
- <option>OWNER</option> and <option>GROUP</option> fields support simple
- printf-like string substitutions:</para>
+ <option>OWNER</option>, <option>GROUP</option> and <option>RUN</option>
+ fields support simple printf-like string substitutions. For
+ <option>RUN</option> they are applied immediately before program
+ is launched, after all rules have been processed. It allows use of
+ complete environment set up by earlier rules including exported
+ variables. For all other fields substitutions are applied when rule
+ is being processed. The supported substitutions are:</para>
<variablelist>
<varlistentry>
<term><option>$kernel</option>, <option>%k</option></term>
[-- Attachment #2: Type: application/pgp-signature, Size: 189 bytes --]
^ permalink raw reply related [flat|nested] 10+ messages in thread* Re: DEVLINKS and DEVNAME variables in RUN rules
2006-01-24 16:24 DEVLINKS and DEVNAME variables in RUN rules Olivier Blin
` (7 preceding siblings ...)
2006-01-25 19:38 ` Andrey Borzenkov
@ 2006-01-26 1:18 ` Kay Sievers
8 siblings, 0 replies; 10+ messages in thread
From: Kay Sievers @ 2006-01-26 1:18 UTC (permalink / raw)
To: linux-hotplug
On Wed, Jan 25, 2006 at 10:38:19PM +0300, Andrey Borzenkov wrote:
> On Wednesday 25 January 2006 22:10, Kay Sievers wrote:
> > Hehe, no, as mentioned in the last mail,
>
> too late :)
Yeah, I know that. :)
> > we can't patch the created man
> > page, it comes from "docs/udev.xml".
>
> Why is it verion-controlled then?
It just avoids the dependency on xmlto, no special reason.
> > I don't mind putting it in there myself, but if you want to send a new
> > patch, go for it. :)
>
> third attempt. I do not mind, I practice (st-)git on your expense :) This time
> attached due to overly long lines.
Thanks, I've applied this.
Kay
-------------------------------------------------------
This SF.net email is sponsored by: Splunk Inc. Do you grep through log files
for problems? Stop! Download the new AJAX search engine that makes
searching your log files as easy as surfing the web. DOWNLOAD SPLUNK!
http://sel.as-us.falkag.net/sel?cmd=lnk&kid\x103432&bid#0486&dat\x121642
_______________________________________________
Linux-hotplug-devel mailing list http://linux-hotplug.sourceforge.net
Linux-hotplug-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/linux-hotplug-devel
^ permalink raw reply [flat|nested] 10+ messages in thread