Re: [systemd-devel] udev rules environment variable

2013-12-18 Thread Andrey Borzenkov
В Wed, 18 Dec 2013 02:52:01 +0100 Kay Sievers пишет: > On Tue, Dec 17, 2013 at 8:14 PM, Andrey Borzenkov wrote: > > В Tue, 17 Dec 2013 19:59:47 +0100 Kay Sievers пишет: > > >> # modprobe dummy > > > > dummy is not renamed. > > > UDEV [80256.274447] move /devices/pci:00/:00:03.0/n

Re: [systemd-devel] udev rules environment variable

2013-12-18 Thread Andrey Borzenkov
В Wed, 18 Dec 2013 13:36:52 +0100 Robert Milasan пишет: > > So basically it doesn't really work ?! > It does not always work for net device as it looks like. ___ systemd-devel mailing list [email protected] http://lists.freedesktop.

Re: [systemd-devel] udev rules environment variable

2013-12-18 Thread Robert Milasan
On Wed, 18 Dec 2013 14:39:57 +0100 "Kay Sievers" wrote: > On Wed, Dec 18, 2013 at 2:07 PM, Robert Milasan > wrote: > > > One more question: Where exactly is 'test_device' variable saved, I > > mean physically? I suppose it should be in /run/udev/data or > > something similar no? > > Yes, in th

Re: [systemd-devel] udev rules environment variable

2013-12-18 Thread Kay Sievers
On Wed, Dec 18, 2013 at 2:07 PM, Robert Milasan wrote: > One more question: Where exactly is 'test_device' variable saved, I > mean physically? I suppose it should be in /run/udev/data or something > similar no? Yes, in the udev database at /run/udev/data/. It's plain text, just look into it. T

Re: [systemd-devel] udev rules environment variable

2013-12-18 Thread Robert Milasan
On Wed, 18 Dec 2013 02:52:01 +0100 "Kay Sievers" wrote: > On Tue, Dec 17, 2013 at 8:14 PM, Andrey Borzenkov > wrote: > > В Tue, 17 Dec 2013 19:59:47 +0100 Kay Sievers пишет: > > >> # modprobe dummy > > > > dummy is not renamed. > > > UDEV [80256.274447] > > move /devices/pci:00/:

Re: [systemd-devel] udev rules environment variable

2013-12-18 Thread Robert Milasan
On Tue, 17 Dec 2013 23:14:12 +0400 "Andrey Borzenkov" wrote: > В Tue, 17 Dec 2013 19:59:47 +0100 > Kay Sievers пишет: > > > > > Works just fine here as expected, it's probably something in your > > setup. > > > > No, it *your* default interface renaming :) > > > Kay > > > > # head -2 /etc/

Re: [systemd-devel] udev rules environment variable

2013-12-17 Thread Kay Sievers
On Tue, Dec 17, 2013 at 8:14 PM, Andrey Borzenkov wrote: > В Tue, 17 Dec 2013 19:59:47 +0100 Kay Sievers пишет: >> # modprobe dummy > > dummy is not renamed. > UDEV [80256.274447] move /devices/pci:00/:00:03.0/net/ens3 (net) > ACTION=move > ... > INTERFACE=ens3 > SEQNUM=1452 > ...

Re: [systemd-devel] udev rules environment variable

2013-12-17 Thread Kay Sievers
On Tue, Dec 17, 2013 at 6:57 PM, Robert Milasan wrote: > On Tue, 17 Dec 2013 17:36:21 +0100 > "Kay Sievers" wrote: > >> On Tue, Dec 17, 2013 at 2:05 PM, Robert Milasan >> wrote: >> > On Tue, 17 Dec 2013 13:54:34 +0100 >> > "Martin Pitt" wrote: >> > >> >> Robert Milasan [2013-12-17 12:44 +0100]:

Re: [systemd-devel] udev rules environment variable

2013-12-17 Thread Andrey Borzenkov
В Tue, 17 Dec 2013 19:59:47 +0100 Kay Sievers пишет: > > Works just fine here as expected, it's probably something in your setup. > No, it *your* default interface renaming :) > Kay > > # head -2 /etc/udev/rules.d/10-local.rules > ACTION=="add", SUBSYSTEM=="net", ENV{test_device}="1" > ACTIO

Re: [systemd-devel] udev rules environment variable

2013-12-17 Thread Robert Milasan
On Tue, 17 Dec 2013 17:36:21 +0100 "Kay Sievers" wrote: > On Tue, Dec 17, 2013 at 2:05 PM, Robert Milasan > wrote: > > On Tue, 17 Dec 2013 13:54:34 +0100 > > "Martin Pitt" wrote: > > > >> Robert Milasan [2013-12-17 12:44 +0100]: > >> > I have this rule as a test, but doesn't do squat (meaning i

Re: [systemd-devel] udev rules environment variable

2013-12-17 Thread Andrey Borzenkov
В Tue, 17 Dec 2013 14:05:56 +0100 Robert Milasan пишет: > On Tue, 17 Dec 2013 13:54:34 +0100 > "Martin Pitt" wrote: > > > Robert Milasan [2013-12-17 12:44 +0100]: > > > I have this rule as a test, but doesn't do squat (meaning it doesnt > > > work) :) > > > > > > ACTION=="add", SUBSYSTEM=="net

Re: [systemd-devel] udev rules environment variable

2013-12-17 Thread Kay Sievers
On Tue, Dec 17, 2013 at 2:05 PM, Robert Milasan wrote: > On Tue, 17 Dec 2013 13:54:34 +0100 > "Martin Pitt" wrote: > >> Robert Milasan [2013-12-17 12:44 +0100]: >> > I have this rule as a test, but doesn't do squat (meaning it doesnt >> > work) :) >> > >> > ACTION=="add", SUBSYSTEM=="net", KERNEL

Re: [systemd-devel] udev rules environment variable

2013-12-17 Thread Robert Milasan
On Tue, 17 Dec 2013 13:54:34 +0100 "Martin Pitt" wrote: > Robert Milasan [2013-12-17 12:44 +0100]: > > I have this rule as a test, but doesn't do squat (meaning it doesnt > > work) :) > > > > ACTION=="add", SUBSYSTEM=="net", KERNEL=="?*", ENV{test_device}="1" > > > > ACTION=="remove", SUBSYSTEM

Re: [systemd-devel] udev rules environment variable

2013-12-17 Thread Martin Pitt
Robert Milasan [2013-12-17 12:44 +0100]: > I have this rule as a test, but doesn't do squat (meaning it doesnt > work) :) > > ACTION=="add", SUBSYSTEM=="net", KERNEL=="?*", ENV{test_device}="1" > > ACTION=="remove", SUBSYSTEM=="net", KERNEL=="?*", ENV{test_device}=="1", > RUN+="/bin/sh -c 'echo

Re: [systemd-devel] udev rules environment variable

2013-12-17 Thread Robert Milasan
On Tue, 17 Dec 2013 11:52:15 +0100 "Kay Sievers" wrote: > On Tue, Dec 17, 2013 at 8:56 AM, Hannes Reinecke wrote: > > On 12/17/2013 08:52 AM, Robert Milasan wrote: > >> Hello, > >> got a small question about creating a rule, like this: > >> > >> ACTION=="add", , ENV{test_device}="1" > >> >

Re: [systemd-devel] udev rules environment variable

2013-12-17 Thread Kay Sievers
On Tue, Dec 17, 2013 at 11:58 AM, Hannes Reinecke wrote: > On 12/17/2013 11:52 AM, Kay Sievers wrote: >> On Tue, Dec 17, 2013 at 8:56 AM, Hannes Reinecke wrote: >>> On 12/17/2013 08:52 AM, Robert Milasan wrote: Hello, got a small question about creating a rule, like this: AC

Re: [systemd-devel] udev rules environment variable

2013-12-17 Thread Hannes Reinecke
On 12/17/2013 11:52 AM, Kay Sievers wrote: > On Tue, Dec 17, 2013 at 8:56 AM, Hannes Reinecke wrote: >> On 12/17/2013 08:52 AM, Robert Milasan wrote: >>> Hello, >>> got a small question about creating a rule, like this: >>> >>> ACTION=="add", , ENV{test_device}="1" >>> >>> ACTION=="remove, .

Re: [systemd-devel] udev rules environment variable

2013-12-17 Thread Kay Sievers
On Tue, Dec 17, 2013 at 8:56 AM, Hannes Reinecke wrote: > On 12/17/2013 08:52 AM, Robert Milasan wrote: >> Hello, >> got a small question about creating a rule, like this: >> >> ACTION=="add", , ENV{test_device}="1" >> >> ACTION=="remove, , ENV{test_device}=="1", >> RUN+="/path/to/some/s

Re: [systemd-devel] udev rules environment variable

2013-12-16 Thread Hannes Reinecke
On 12/17/2013 08:52 AM, Robert Milasan wrote: > Hello, > got a small question about creating a rule, like this: > > ACTION=="add", , ENV{test_device}="1" > > ACTION=="remove, , ENV{test_device}=="1", > RUN+="/path/to/some/script" > > Does udev save test_device variable someplace and th

[systemd-devel] udev rules environment variable

2013-12-16 Thread Robert Milasan
Hello, got a small question about creating a rule, like this: ACTION=="add", , ENV{test_device}="1" ACTION=="remove, , ENV{test_device}=="1", RUN+="/path/to/some/script" Does udev save test_device variable someplace and then it can be used later on, when have ACTION=="remove" ? -- R