Hi,

For udev (& anything else on the NFS root filesystem), you can use rpm to tell 
you the package version.

It is a 2 step process, first find a binary or other file you want to find the 
version of. Then query the rpm database to find which package it belongs to.

So for your example of udevd the process is

[EMAIL PROTECTED]:~# which udevd
/sbin/udevd
[EMAIL PROTECTED]:~# rpm -qf /sbin/udevd # You can alternatively use rpm -qf 
`!!` if you like shortcuts
udev-0.056-3.0.1.0600975

..and as Geoff said, it is version 056.

Additionally, once you know the package name, you can get information about the 
package (rpm -qi udev), list all files in the package (rpm -ql udev) and verify 
the package integrity (rpm -V udev).

The above works on any RPM based linux distribution and can be a useful way of 
finding your way around.

Regards

Phil Q 

Phil Quiney, Senior Software Engineer
Trinity Convergence
Cambridge Business Park
Cowley Road
Cambridge CB4 0WZ, UK
T: +44(0)1223-435536
F: +44(0)1223-435560
www.trinityconvergence.com


-----Original Message-----
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of bj
Sent: 29 September 2008 22:59
To: Amey, Geoff
Cc: [email protected]
Subject: Re: How to know if a udev rule be executed?

I'm trying to figure out exactly which version of udev I have with my 
montavista distro.  I try to run 'udevd --version' / 'udev --version' 
but they just return me to the command prompt with no info at all.  I made sure 
to check that udev was indeed running with 'ps aux | grep udev' and it's 
certainly there.

[EMAIL PROTECTED]:~# udev --version
[EMAIL PROTECTED]:~# udevd --version
[EMAIL PROTECTED]:~# ps aux | grep udev
root       822  0.0  0.4   1416   388 ?        S<s  00:00   0:00 udevd
root      1085  3.0  0.5   1572   456 ?        S+   00:02   0:00 grep udev

How did you figure out your version, and then also how did you update it after 
realizing that your version wasn't up to snuff?  The goal I'm trying to reach 
here is to create a udev rule to mount usb flash drives upon insertion.  I saw 
the previous chatter about this topic and people claim that this issue has been 
gone over and solved but I'm still having problems with it so please don't 
direct me to 'just search the list'.  
Thanks for any tips.

BJ

Amey, Geoff wrote:
> Try looking into udevtest, I don't remember the exact sytax, but it 
> applies all of your udev rules to a particular /sys/ entry and prints 
> the result to the console.
>
> Another thing to be aware of with udev is the version.  The one that 
> came on my DM355 board was version 056, which doesn't support the RUN 
> keyword.  I had to upgrade to 057 to use the RUN keyword.  (udev is 
> currently somewhere around version 120).  After downloading and cross 
> compiling 057 (udev, udevd, udevinfo, udevtest, etc...) I was able to 
> get my RUN rules to work.
>
> Hope this helps
>
>  - Geoff
>
> -----Original Message-----
> From: [EMAIL PROTECTED]
> [mailto:[EMAIL PROTECTED] On 
> Behalf Of John Wu
> Sent: Tuesday, June 03, 2008 12:16 AM
> To: [email protected]
> Subject: How to know if a udev rule be executed?
>
>
> I write a custom udev rule to auto mount the SD card, but it do not 
> mount the card when I plug in. I want to know if the rule be executed?
> My rule content is:
> RUN+="mount /dev/mmcblk0p1 /mnt"
> I write a simplest rule with no condition the rule is named 
> /etc/udev/rules.d/60-local.rules
>
> _______________________________________________
> Davinci-linux-open-source mailing list 
> [email protected]
> http://linux.davincidsp.com/mailman/listinfo/davinci-linux-open-source
> _______________________________________________
> Davinci-linux-open-source mailing list 
> [email protected]
> http://linux.davincidsp.com/mailman/listinfo/davinci-linux-open-source
>   

_______________________________________________
Davinci-linux-open-source mailing list
[email protected]
http://linux.davincidsp.com/mailman/listinfo/davinci-linux-open-source

_______________________________________________
Davinci-linux-open-source mailing list
[email protected]
http://linux.davincidsp.com/mailman/listinfo/davinci-linux-open-source

Reply via email to