Serial Number
David Henderson
dhenderson at digital-pipe.com
Fri May 6 16:35:28 UTC 2011
On 05/06/2011 11:19 AM, Harald Becker wrote:
> Hallo David!
>
>> I'm trying to use mdev to create some unique device file names and
>> would like to use the obvious choice of a serial number, however, that
>> information doesn't appear in any of the env output from mdev. Does
>> anyone know of a way to obtain this information via mdev? I've also
>> looked at hdparm, but it doesn't appear to work with USB drives and I
>> need a universal solution. Any help would greatly be appreciated.
> Can you give some examples on how you want your devices named?
>
> I formerly used a script called from mdev and used small regular files
> stored on the temporary device file system (in a subdirectory) to hold
> counts and other name informations. Indeed not the nicest approach, but
> works fast and reliable.
>
> --
> Harald
> _______________________________________________
> busybox mailing list
> busybox at busybox.net
> http://lists.busybox.net/mailman/listinfo/busybox
Hey Harald, thanks for the reply. If I can gain access to the serial
numbers of the drive, I'd just create a symlink with that being the name
of the file. In the absence of a serial number (since it's not
detectable in all scenarios), I'd probably default to some other types
of info (e.g. manufacturer, model #, etc). Perhaps a peek into your
file might help as I'm also using mdev to call an external script for
processing.
Dave
More information about the busybox
mailing list