* Re: determining udev running
2004-12-15 19:21 determining udev running rich turner
@ 2004-12-15 19:23 ` Stefan Schweizer
2004-12-15 19:30 ` Marco d'Itri
` (8 subsequent siblings)
9 siblings, 0 replies; 11+ messages in thread
From: Stefan Schweizer @ 2004-12-15 19:23 UTC (permalink / raw)
To: linux-hotplug
On Wed, 15 Dec 2004 11:21:14 -0800, rich turner <rich@storix.com> wrote:
> is there a consistent way to know if udev is currently running on a
> system?
>
> i realize udevd will be running and will be visible through a ps
> listing, but i would like to check for the existence of a file or an
> entry in /proc or /sys.
/dev/.udev
though it is not in /proc or /sys but in /dev ...
Stefan
-------------------------------------------------------
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://productguide.itmanagersjournal.com/
_______________________________________________
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] 11+ messages in thread* Re: determining udev running
2004-12-15 19:21 determining udev running rich turner
2004-12-15 19:23 ` Stefan Schweizer
@ 2004-12-15 19:30 ` Marco d'Itri
2004-12-15 19:44 ` rich turner
` (7 subsequent siblings)
9 siblings, 0 replies; 11+ messages in thread
From: Marco d'Itri @ 2004-12-15 19:30 UTC (permalink / raw)
To: linux-hotplug
On Dec 15, rich turner <rich@storix.com> wrote:
> is there a consistent way to know if udev is currently running on a
> system?
Debian packages use "test -e /dev/.udevdb".
--
ciao, |
Marco | [9826 sbehveE.kewNw]
-------------------------------------------------------
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://productguide.itmanagersjournal.com/
_______________________________________________
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] 11+ messages in thread* Re: determining udev running
2004-12-15 19:21 determining udev running rich turner
2004-12-15 19:23 ` Stefan Schweizer
2004-12-15 19:30 ` Marco d'Itri
@ 2004-12-15 19:44 ` rich turner
2004-12-15 19:49 ` Kay Sievers
` (6 subsequent siblings)
9 siblings, 0 replies; 11+ messages in thread
From: rich turner @ 2004-12-15 19:44 UTC (permalink / raw)
To: linux-hotplug
although that may be how udev was designed, it appears fc3 does not
follow that standard. there is not a /dev/.udev file.
# ls -la /dev/.udev*
-rw-r--r-- 1 root root 163840 Dec 15 03:27 /dev/.udev.tdb
would the best way be to determine if /dev is mounted on tmpfs?
does anyone else use /dev on tmpfs?
On Wed, 2004-12-15 at 11:23, Stefan Schweizer wrote:
> On Wed, 15 Dec 2004 11:21:14 -0800, rich turner <rich@storix.com> wrote:
> > is there a consistent way to know if udev is currently running on a
> > system?
> >
> > i realize udevd will be running and will be visible through a ps
> > listing, but i would like to check for the existence of a file or an
> > entry in /proc or /sys.
>
> /dev/.udev
> though it is not in /proc or /sys but in /dev ...
>
> Stefan
>
>
> -------------------------------------------------------
> 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://productguide.itmanagersjournal.com/
> _______________________________________________
> 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
-------------------------------------------------------
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://productguide.itmanagersjournal.com/
_______________________________________________
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] 11+ messages in thread* Re: determining udev running
2004-12-15 19:21 determining udev running rich turner
` (2 preceding siblings ...)
2004-12-15 19:44 ` rich turner
@ 2004-12-15 19:49 ` Kay Sievers
2004-12-15 19:50 ` Marco d'Itri
` (5 subsequent siblings)
9 siblings, 0 replies; 11+ messages in thread
From: Kay Sievers @ 2004-12-15 19:49 UTC (permalink / raw)
To: linux-hotplug
On Wed, 2004-12-15 at 11:21 -0800, rich turner wrote:
> is there a consistent way to know if udev is currently running on a
> system?
>
> i realize udevd will be running and will be visible through a ps
> listing, but i would like to check for the existence of a file or an
> entry in /proc or /sys.
As udev runs entirely in userspace, the kernel doesn't know about it.
You may check for a symlink to udevsend in /etc/hotplug.d/default/
or /proc/sys/kernel/hotplug that may be set to udev or udevsend.
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://productguide.itmanagersjournal.com/
_______________________________________________
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] 11+ messages in thread* Re: determining udev running
2004-12-15 19:21 determining udev running rich turner
` (3 preceding siblings ...)
2004-12-15 19:49 ` Kay Sievers
@ 2004-12-15 19:50 ` Marco d'Itri
2004-12-15 19:51 ` Marco d'Itri
` (4 subsequent siblings)
9 siblings, 0 replies; 11+ messages in thread
From: Marco d'Itri @ 2004-12-15 19:50 UTC (permalink / raw)
To: linux-hotplug
On Dec 15, rich turner <rich@storix.com> wrote:
> although that may be how udev was designed, it appears fc3 does not
> follow that standard. there is not a /dev/.udev file.
>
> # ls -la /dev/.udev*
> -rw-r--r-- 1 root root 163840 Dec 15 03:27 /dev/.udev.tdb
FC3 ships an old release of udev.
> would the best way be to determine if /dev is mounted on tmpfs?
This is more complex.
> does anyone else use /dev on tmpfs?
Everybody, I think.
--
ciao, |
Marco | [9827 soIzouy3MUWTw]
-------------------------------------------------------
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://productguide.itmanagersjournal.com/
_______________________________________________
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] 11+ messages in thread* Re: determining udev running
2004-12-15 19:21 determining udev running rich turner
` (4 preceding siblings ...)
2004-12-15 19:50 ` Marco d'Itri
@ 2004-12-15 19:51 ` Marco d'Itri
2004-12-15 19:52 ` Kay Sievers
` (3 subsequent siblings)
9 siblings, 0 replies; 11+ messages in thread
From: Marco d'Itri @ 2004-12-15 19:51 UTC (permalink / raw)
To: linux-hotplug
[-- Attachment #1: Type: text/plain, Size: 294 bytes --]
On Dec 15, Kay Sievers <kay.sievers@vrfy.org> wrote:
> You may check for a symlink to udevsend in /etc/hotplug.d/default/
This will not work if udev is not active (e.g. because the init script
detected a 2.4 kernel or was manually disabled).
--
ciao, |
Marco | [9828 fijBf.JNQbEbk]
[-- Attachment #2: Digital signature --]
[-- Type: application/pgp-signature, Size: 189 bytes --]
^ permalink raw reply [flat|nested] 11+ messages in thread* Re: determining udev running
2004-12-15 19:21 determining udev running rich turner
` (5 preceding siblings ...)
2004-12-15 19:51 ` Marco d'Itri
@ 2004-12-15 19:52 ` Kay Sievers
2004-12-15 22:50 ` rich turner
` (2 subsequent siblings)
9 siblings, 0 replies; 11+ messages in thread
From: Kay Sievers @ 2004-12-15 19:52 UTC (permalink / raw)
To: linux-hotplug
On Wed, 2004-12-15 at 11:44 -0800, rich turner wrote:
> although that may be how udev was designed, it appears fc3 does not
> follow that standard. there is not a /dev/.udev file.
There is no such standard. You can specify the location in the udev.conf
file. But be aware that newer udev versions use that value to create a
directory and not a single file.
> # ls -la /dev/.udev*
> -rw-r--r-- 1 root root 163840 Dec 15 03:27 /dev/.udev.tdb
>
> would the best way be to determine if /dev is mounted on tmpfs?
> does anyone else use /dev on tmpfs?
Allmost all users of udev use tmpfs. If /dev is on tmpfs and you find a
db file/directory at the specified location, you can assume that udev
maintains the directory.
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://productguide.itmanagersjournal.com/
_______________________________________________
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] 11+ messages in thread* Re: determining udev running
2004-12-15 19:21 determining udev running rich turner
` (6 preceding siblings ...)
2004-12-15 19:52 ` Kay Sievers
@ 2004-12-15 22:50 ` rich turner
2004-12-15 23:21 ` rich turner
2004-12-15 23:36 ` Kay Sievers
9 siblings, 0 replies; 11+ messages in thread
From: rich turner @ 2004-12-15 22:50 UTC (permalink / raw)
To: linux-hotplug
On Wed, 2004-12-15 at 11:51, Marco d'Itri wrote:
> On Dec 15, Kay Sievers <kay.sievers@vrfy.org> wrote:
>
> > You may check for a symlink to udevsend in /etc/hotplug.d/default/
> This will not work if udev is not active (e.g. because the init script
> detected a 2.4 kernel or was manually disabled).
but i think this is what i need to know, if udev is active. or better
yet, i only want to know whether a system booted with udev, or populated
the /dev directory using udev.
isnt there anything i can check to see that udev was used to populate
/dev?
-------------------------------------------------------
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://productguide.itmanagersjournal.com/
_______________________________________________
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] 11+ messages in thread* Re: determining udev running
2004-12-15 19:21 determining udev running rich turner
` (7 preceding siblings ...)
2004-12-15 22:50 ` rich turner
@ 2004-12-15 23:21 ` rich turner
2004-12-15 23:36 ` Kay Sievers
9 siblings, 0 replies; 11+ messages in thread
From: rich turner @ 2004-12-15 23:21 UTC (permalink / raw)
To: linux-hotplug
can someone shoot any holes in my logic here. how about this:
we used udev to populate /dev if:
1. /dev is a mounted filesystem as determined by /proc/mounts
2. there is a file /dev/.udev.tdb
is there any importance for checking for udevd? doesnt it just listen
for new devices detected by the kernel and create the nodes if they dont
already exist?
On Wed, 2004-12-15 at 14:50, rich turner wrote:
> On Wed, 2004-12-15 at 11:51, Marco d'Itri wrote:
> > On Dec 15, Kay Sievers <kay.sievers@vrfy.org> wrote:
> >
> > > You may check for a symlink to udevsend in /etc/hotplug.d/default/
> > This will not work if udev is not active (e.g. because the init script
> > detected a 2.4 kernel or was manually disabled).
>
> but i think this is what i need to know, if udev is active. or better
> yet, i only want to know whether a system booted with udev, or populated
> the /dev directory using udev.
>
> isnt there anything i can check to see that udev was used to populate
> /dev?
>
>
>
> -------------------------------------------------------
> 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://productguide.itmanagersjournal.com/
> _______________________________________________
> 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
-------------------------------------------------------
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://productguide.itmanagersjournal.com/
_______________________________________________
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] 11+ messages in thread* Re: determining udev running
2004-12-15 19:21 determining udev running rich turner
` (8 preceding siblings ...)
2004-12-15 23:21 ` rich turner
@ 2004-12-15 23:36 ` Kay Sievers
9 siblings, 0 replies; 11+ messages in thread
From: Kay Sievers @ 2004-12-15 23:36 UTC (permalink / raw)
To: linux-hotplug
On Wed, 2004-12-15 at 15:21 -0800, rich turner wrote:
> can someone shoot any holes in my logic here. how about this:
>
> we used udev to populate /dev if:
> 1. /dev is a mounted filesystem as determined by /proc/mounts
No, udev will work perfectly on any filesystem, including the root filesystem.
> 2. there is a file /dev/.udev.tdb
You need to get the filename from /etc/udev/udev.conf. But if /dev is on
a persistent filesystem, yo can't know if its from the current system,
or an earlier run.
As said in the earlier mail: If /dev is on tmpfs and you find a udevdb
at the configured location, there is a high probability that udev is
manging the /dev directory.
> is there any importance for checking for udevd? doesnt it just listen
> for new devices detected by the kernel and create the nodes if they dont
> already exist?
udevd is just an event serializer. It collect events from the kernel and
forks the udev binary in the right order.
So, there in no distribution independent way to know if udev has created
the device nodes. There is no single state, where you can get that
information. What exact problem you need to address?
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://productguide.itmanagersjournal.com/
_______________________________________________
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] 11+ messages in thread