linux-hotplug.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* questions about udev...beginner
@ 2011-09-12  7:07 linuxcbon
  2011-09-12  7:27 ` Tom Gundersen
                   ` (6 more replies)
  0 siblings, 7 replies; 8+ messages in thread
From: linuxcbon @ 2011-09-12  7:07 UTC (permalink / raw)
  To: linux-hotplug

Hi,

I am not familiar with udev and didn't find a good enough howto.
So I ask you questions, thank you for your kind help in advance.

I have put this in rc.sysinit :
/sbin/udevd --daemon
/sbin/udevadm trigger
/sbin/modoprobe many modules....
/sbin/udevadm settle
is it the correct way of doing this ?

Another question is :
Do I need rules in /etc/udev  ? Or not needed , automagical ?

Best regards 

^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: questions about udev...beginner
  2011-09-12  7:07 questions about udev...beginner linuxcbon
@ 2011-09-12  7:27 ` Tom Gundersen
  2011-09-12 13:56 ` William Hubbs
                   ` (5 subsequent siblings)
  6 siblings, 0 replies; 8+ messages in thread
From: Tom Gundersen @ 2011-09-12  7:27 UTC (permalink / raw)
  To: linux-hotplug

On Mon, Sep 12, 2011 at 9:07 AM, linuxcbon <linuxcbon@yahoo.fr> wrote:
> I am not familiar with udev and didn't find a good enough howto.
> So I ask you questions, thank you for your kind help in advance.

This is how we do it in Arch:
<http://projects.archlinux.org/initscripts.git/tree/functions#n311>.

> I have put this in rc.sysinit :
> /sbin/udevd --daemon
> /sbin/udevadm trigger

You probably want
  /sbin/udevadm trigger --action­d --type=subsystems
  /sbin/udevadm trigger --action­d --typeÞvices
instead (the default is only --typeÞvices, and not --type=subsystems).

> /sbin/modoprobe many modules....
> /sbin/udevadm settle
> is it the correct way of doing this ?

Looks good except for the missing subsystems bit.

> Another question is :
> Do I need rules in /etc/udev  ? Or not needed , automagical ?

You should not need any rules in /etc/udev, the standard ones shipped
in /lib/udev should be sufficient.

Cheers,

Tom

^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: questions about udev...beginner
  2011-09-12  7:07 questions about udev...beginner linuxcbon
  2011-09-12  7:27 ` Tom Gundersen
@ 2011-09-12 13:56 ` William Hubbs
  2011-09-12 14:06 ` Allin Cottrell
                   ` (4 subsequent siblings)
  6 siblings, 0 replies; 8+ messages in thread
From: William Hubbs @ 2011-09-12 13:56 UTC (permalink / raw)
  To: linux-hotplug

[-- Attachment #1: Type: text/plain, Size: 971 bytes --]

Hi Tom and all,

On Mon, Sep 12, 2011 at 09:27:50AM +0200, Tom Gundersen wrote:
> On Mon, Sep 12, 2011 at 9:07 AM, linuxcbon <linuxcbon@yahoo.fr> wrote:
> > I am not familiar with udev and didn't find a good enough howto.
> > So I ask you questions, thank you for your kind help in advance.
> 
> This is how we do it in Arch:
> <http://projects.archlinux.org/initscripts.git/tree/functions#n311>.
> 
> > I have put this in rc.sysinit :
> > /sbin/udevd --daemon
> > /sbin/udevadm trigger
> 
> You probably want
>   /sbin/udevadm trigger --action=add --type=subsystems
>   /sbin/udevadm trigger --action=add --type=devices
> instead (the default is only --type=devices, and not --type=subsystems).
 
Now I need clarification. The README shipped with udev does not mention
"--action=add". According to that file, you just want

/sbin/udevadm trigger --type=subsystems
/sbin/udevadm trigger --type=devices

Which is correct?

Thanks,

William


[-- Attachment #2: Type: application/pgp-signature, Size: 198 bytes --]

^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: questions about udev...beginner
  2011-09-12  7:07 questions about udev...beginner linuxcbon
  2011-09-12  7:27 ` Tom Gundersen
  2011-09-12 13:56 ` William Hubbs
@ 2011-09-12 14:06 ` Allin Cottrell
  2011-09-12 16:23 ` Tom Gundersen
                   ` (3 subsequent siblings)
  6 siblings, 0 replies; 8+ messages in thread
From: Allin Cottrell @ 2011-09-12 14:06 UTC (permalink / raw)
  To: linux-hotplug

On Mon, 12 Sep 2011, William Hubbs wrote:

> Hi Tom and all,
>
> On Mon, Sep 12, 2011 at 09:27:50AM +0200, Tom Gundersen wrote:
>> On Mon, Sep 12, 2011 at 9:07 AM, linuxcbon <linuxcbon@yahoo.fr> wrote:
>>> I am not familiar with udev and didn't find a good enough howto.
>>> So I ask you questions, thank you for your kind help in advance.
>>
>> This is how we do it in Arch:
>> <http://projects.archlinux.org/initscripts.git/tree/functions#n311>.
>>
>>> I have put this in rc.sysinit :
>>> /sbin/udevd --daemon
>>> /sbin/udevadm trigger
>>
>> You probably want
>>   /sbin/udevadm trigger --action­d --type=subsystems
>>   /sbin/udevadm trigger --action­d --typeÞvices
>> instead (the default is only --typeÞvices, and not --type=subsystems).
>
> Now I need clarification. The README shipped with udev does not mention
> "--action­d". According to that file, you just want
>
> /sbin/udevadm trigger --type=subsystems
> /sbin/udevadm trigger --typeÞvices
>
> Which is correct?

Well the latter works fine here, with udev 173.

Allin Cottrell




^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: questions about udev...beginner
  2011-09-12  7:07 questions about udev...beginner linuxcbon
                   ` (2 preceding siblings ...)
  2011-09-12 14:06 ` Allin Cottrell
@ 2011-09-12 16:23 ` Tom Gundersen
  2011-09-12 16:57 ` linuxcbon
                   ` (2 subsequent siblings)
  6 siblings, 0 replies; 8+ messages in thread
From: Tom Gundersen @ 2011-09-12 16:23 UTC (permalink / raw)
  To: linux-hotplug

On Mon, Sep 12, 2011 at 3:56 PM, William Hubbs <w.d.hubbs@gmail.com> wrote:
> Now I need clarification. The README shipped with udev does not mention
> "--action­d". According to that file, you just want
>
> /sbin/udevadm trigger --type=subsystems
> /sbin/udevadm trigger --typeÞvices
>
> Which is correct?

I guess Kay could answer this with more authority. But I'm pretty
certain --type­d is correct.

Have a look in init/udev-trigger.service.in to see how udev behaves
when used with systemd (it uses "add").

Also, when that section of the README was written, --type­d was the
default, but that later changed to --type=change, so it looks like it
is just out of date.

Cheers,

Tom

^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: questions about udev...beginner
  2011-09-12  7:07 questions about udev...beginner linuxcbon
                   ` (3 preceding siblings ...)
  2011-09-12 16:23 ` Tom Gundersen
@ 2011-09-12 16:57 ` linuxcbon
  2011-09-12 17:09 ` Tom Gundersen
  2011-09-18 15:51 ` Kay Sievers
  6 siblings, 0 replies; 8+ messages in thread
From: linuxcbon @ 2011-09-12 16:57 UTC (permalink / raw)
  To: linux-hotplug

Hi,

> I guess Kay could answer this with more authority. But I'm
> pretty
> certain --type≠d is correct.

You mean --action≠d

> Also, when that section of the README was written,
> --type≠d was the
> default, but that later changed to --type=change, so it
> looks like it
> is just out of date.

udevadm trigger --help says : default for action is "change" 

So you mean ?
udevadm trigger --typefivices --action≠d
udevadm trigger --type=subsystems --action≠d

Thanks.


--
To unsubscribe from this list: send the line "unsubscribe linux-hotplug" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: questions about udev...beginner
  2011-09-12  7:07 questions about udev...beginner linuxcbon
                   ` (4 preceding siblings ...)
  2011-09-12 16:57 ` linuxcbon
@ 2011-09-12 17:09 ` Tom Gundersen
  2011-09-18 15:51 ` Kay Sievers
  6 siblings, 0 replies; 8+ messages in thread
From: Tom Gundersen @ 2011-09-12 17:09 UTC (permalink / raw)
  To: linux-hotplug

On Mon, Sep 12, 2011 at 6:57 PM, linuxcbon <linuxcbon@yahoo.fr> wrote:
>> I guess Kay could answer this with more authority. But I'm
>> pretty
>> certain --type­d is correct.
>
> You mean --action­d

Yes, sorry.

>> Also, when that section of the README was written,
>> --type­d was the
>> default, but that later changed to --type=change, so it
>> looks like it
>> is just out of date.
>
> udevadm trigger --help says : default for action is "change"

Exactly. It used to be "add".

> So you mean ?
> udevadm trigger --typeÞvices --action­d
> udevadm trigger --type=subsystems --action­d

Indeed (as in my original email).

-t

^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: questions about udev...beginner
  2011-09-12  7:07 questions about udev...beginner linuxcbon
                   ` (5 preceding siblings ...)
  2011-09-12 17:09 ` Tom Gundersen
@ 2011-09-18 15:51 ` Kay Sievers
  6 siblings, 0 replies; 8+ messages in thread
From: Kay Sievers @ 2011-09-18 15:51 UTC (permalink / raw)
  To: linux-hotplug

On Mon, Sep 12, 2011 at 19:09, Tom Gundersen <teg@jklm.no> wrote:
> On Mon, Sep 12, 2011 at 6:57 PM, linuxcbon <linuxcbon@yahoo.fr> wrote:
>>> I guess Kay could answer this with more authority. But I'm
>>> pretty
>>> certain --type­d is correct.
>>
>> You mean --action­d
>
> Yes, sorry.
>
>>> Also, when that section of the README was written,
>>> --type­d was the
>>> default, but that later changed to --type=change, so it
>>> looks like it
>>> is just out of date.
>>
>> udevadm trigger --help says : default for action is "change"
>
> Exactly. It used to be "add".
>
>> So you mean ?
>> udevadm trigger --typeÞvices --action­d
>> udevadm trigger --type=subsystems --action­d

Classic system 'coldplug' replays the missing events which happened
before userspace was ready to receive them. We usually use 'add' here
because that is what the original event, which we missed, was.

No other other use case, should ever use 'add', only 'change' is
appropriate when the system is already running.

The systemd service files in the udev source tree always reflect the
current way of doing coldplug.

Kay

^ permalink raw reply	[flat|nested] 8+ messages in thread

end of thread, other threads:[~2011-09-18 15:51 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2011-09-12  7:07 questions about udev...beginner linuxcbon
2011-09-12  7:27 ` Tom Gundersen
2011-09-12 13:56 ` William Hubbs
2011-09-12 14:06 ` Allin Cottrell
2011-09-12 16:23 ` Tom Gundersen
2011-09-12 16:57 ` linuxcbon
2011-09-12 17:09 ` Tom Gundersen
2011-09-18 15:51 ` 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).