linux-hotplug.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* Udev question PROGRAM= question
@ 2005-03-15  2:38 Jim Gifford
  2005-03-15  2:54 ` Kay Sievers
                   ` (3 more replies)
  0 siblings, 4 replies; 5+ messages in thread
From: Jim Gifford @ 2005-03-15  2:38 UTC (permalink / raw)
  To: linux-hotplug

If I run a program during the rules creation, example rule
    KERNEL="fd[0-9]*",      PROGRAM="/etc/udev/scripts/floppy-devices.sh %k"
When the device gets removed, how do I tell it to remove everything, or 
run the same program, to remove the /dev entries??

-- 
----
Jim Gifford
maillist@jg555.com



-------------------------------------------------------
SF email is sponsored by - The IT Product Guide
Read honest & candid reviews on hundreds of IT Products from real users.
Discover which products truly live up to the hype. Start reading now.
http://ads.osdn.com/?ad_ide95&alloc_id\x14396&op=click
_______________________________________________
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] 5+ messages in thread

* Re: Udev question PROGRAM= question
  2005-03-15  2:38 Udev question PROGRAM= question Jim Gifford
@ 2005-03-15  2:54 ` Kay Sievers
  2005-03-15  5:42 ` Jim Gifford
                   ` (2 subsequent siblings)
  3 siblings, 0 replies; 5+ messages in thread
From: Kay Sievers @ 2005-03-15  2:54 UTC (permalink / raw)
  To: linux-hotplug

On Mon, 2005-03-14 at 18:38 -0800, Jim Gifford wrote:
> If I run a program during the rules creation, example rule
>     KERNEL="fd[0-9]*",      PROGRAM="/etc/udev/scripts/floppy-devices.sh %k"
> When the device gets removed, how do I tell it to remove everything, or 
> run the same program, to remove the /dev entries??

PROGRAM= is used to return a string that can be matched against with
RESULT=, or be used to set the name of a node with %c. You should not do
anything else on with a callout.

On "remove", udev will remove the node for you and no callout will run.

Kay



-------------------------------------------------------
SF email is sponsored by - The IT Product Guide
Read honest & candid reviews on hundreds of IT Products from real users.
Discover which products truly live up to the hype. Start reading now.
http://ads.osdn.com/?ad_ide95&alloc_id\x14396&op=click
_______________________________________________
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] 5+ messages in thread

* Re: Udev question PROGRAM= question
  2005-03-15  2:38 Udev question PROGRAM= question Jim Gifford
  2005-03-15  2:54 ` Kay Sievers
@ 2005-03-15  5:42 ` Jim Gifford
  2005-03-15  6:53 ` Jim Gifford
  2005-03-15 11:36 ` Kay Sievers
  3 siblings, 0 replies; 5+ messages in thread
From: Jim Gifford @ 2005-03-15  5:42 UTC (permalink / raw)
  To: linux-hotplug

Kay Sievers wrote:

>PROGRAM= is used to return a string that can be matched against with
>RESULT=, or be used to set the name of a node with %c. You should not do
>anything else on with a callout.
>
>On "remove", udev will remove the node for you and no callout will run.
>
>Kay
>
>  
>
What do you do when the result is more than one node??

-- 
----
Jim Gifford
maillist@jg555.com



-------------------------------------------------------
SF email is sponsored by - The IT Product Guide
Read honest & candid reviews on hundreds of IT Products from real users.
Discover which products truly live up to the hype. Start reading now.
http://ads.osdn.com/?ad_ide95&alloc_id\x14396&op=click
_______________________________________________
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] 5+ messages in thread

* Re: Udev question PROGRAM= question
  2005-03-15  2:38 Udev question PROGRAM= question Jim Gifford
  2005-03-15  2:54 ` Kay Sievers
  2005-03-15  5:42 ` Jim Gifford
@ 2005-03-15  6:53 ` Jim Gifford
  2005-03-15 11:36 ` Kay Sievers
  3 siblings, 0 replies; 5+ messages in thread
From: Jim Gifford @ 2005-03-15  6:53 UTC (permalink / raw)
  To: linux-hotplug

Kay Sievers wrote:

>On Mon, 2005-03-14 at 18:38 -0800, Jim Gifford wrote:
>  
>
>>If I run a program during the rules creation, example rule
>>    KERNEL="fd[0-9]*",      PROGRAM="/etc/udev/scripts/floppy-devices.sh %k"
>>When the device gets removed, how do I tell it to remove everything, or 
>>run the same program, to remove the /dev entries??
>>    
>>
>
>PROGRAM= is used to return a string that can be matched against with
>RESULT=, or be used to set the name of a node with %c. You should not do
>anything else on with a callout.
>
>  
>
Kay, let me rephrase my response.
The output of my script is the following
# ./* fd0
fd0 b 2 0
fd0u360 b 2 12
fd0u720 b 2 16
fd0u800 b 2 120
fd0u820 b 2 52
fd0u830 b 2 68
fd0u1040 b 2 84
fd0u1120 b 2 88
fd0u1440 b 2 28
fd0u1600 b 2 124
fd0u1680 b 2 44
fd0u1722 b 2 60
fd0u1743 b 2 76
fd0u1760 b 2 96
fd0u1840 b 2 116
fd0u1920 b 2 100
fd0u2880 b 2 32
fd0u3200 b 2 104
fd0u3520 b 2 108
fd0u3840 b 2 112

What would my udev rule be?

-- 
----
Jim Gifford
maillist@jg555.com



-------------------------------------------------------
SF email is sponsored by - The IT Product Guide
Read honest & candid reviews on hundreds of IT Products from real users.
Discover which products truly live up to the hype. Start reading now.
http://ads.osdn.com/?ad_ide95&alloc_id\x14396&op=click
_______________________________________________
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] 5+ messages in thread

* Re: Udev question PROGRAM= question
  2005-03-15  2:38 Udev question PROGRAM= question Jim Gifford
                   ` (2 preceding siblings ...)
  2005-03-15  6:53 ` Jim Gifford
@ 2005-03-15 11:36 ` Kay Sievers
  3 siblings, 0 replies; 5+ messages in thread
From: Kay Sievers @ 2005-03-15 11:36 UTC (permalink / raw)
  To: linux-hotplug

On Mon, 2005-03-14 at 22:53 -0800, Jim Gifford wrote:
> Kay Sievers wrote:
> 
> >On Mon, 2005-03-14 at 18:38 -0800, Jim Gifford wrote:
> >  
> >
> >>If I run a program during the rules creation, example rule
> >>    KERNEL="fd[0-9]*",      PROGRAM="/etc/udev/scripts/floppy-devices.sh %k"
> >>When the device gets removed, how do I tell it to remove everything, or 
> >>run the same program, to remove the /dev entries??
> >>    
> >>
> >
> >PROGRAM= is used to return a string that can be matched against with
> >RESULT=, or be used to set the name of a node with %c. You should not do
> >anything else on with a callout.
> >
> >  
> >
> Kay, let me rephrase my response.
> The output of my script is the following
> # ./* fd0
> fd0 b 2 0
> fd0u360 b 2 12
> fd0u720 b 2 16
> fd0u800 b 2 120
> fd0u820 b 2 52
> fd0u830 b 2 68
> fd0u1040 b 2 84
> fd0u1120 b 2 88
> fd0u1440 b 2 28
> fd0u1600 b 2 124
> fd0u1680 b 2 44
> fd0u1722 b 2 60
> fd0u1743 b 2 76
> fd0u1760 b 2 96
> fd0u1840 b 2 116
> fd0u1920 b 2 100
> fd0u2880 b 2 32
> fd0u3200 b 2 104
> fd0u3520 b 2 108
> fd0u3840 b 2 112
> 
> What would my udev rule be?

This does not fit into the udev model. We can only support devices that
have a sane sysfs kernel representation.
You may call MAKEDEV it with a dev.d/ script triggered for the fd*
device.

Kay



-------------------------------------------------------
SF email is sponsored by - The IT Product Guide
Read honest & candid reviews on hundreds of IT Products from real users.
Discover which products truly live up to the hype. Start reading now.
http://ads.osdn.com/?ad_ide95&alloc_id\x14396&op=click
_______________________________________________
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] 5+ messages in thread

end of thread, other threads:[~2005-03-15 11:36 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2005-03-15  2:38 Udev question PROGRAM= question Jim Gifford
2005-03-15  2:54 ` Kay Sievers
2005-03-15  5:42 ` Jim Gifford
2005-03-15  6:53 ` Jim Gifford
2005-03-15 11:36 ` Kay Sievers

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).