linux-hotplug.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* udev problems
@ 2004-03-07 12:15 Michal Čihař
  2004-03-07 12:29 ` Kay Sievers
                   ` (21 more replies)
  0 siblings, 22 replies; 23+ messages in thread
From: Michal Čihař @ 2004-03-07 12:15 UTC (permalink / raw)
  To: linux-hotplug

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Hi

I finally decided to give udev a try, but it was not as good as I hoped. I 
have Apacer Mega Steno card reader (as well as other usb storage device) and 
I wanted to have permanent name for it. Okay, lets create some rule in 
udev.rules and script that will generate it. Sometimes the name was generated 
correctly and sometimes not. Afer some experiments I got three rules, that 
seem to work (with line numbers):

21: BUS="scsi", SYSFS{vendor}="Apacer  ", SYSFS{model}="Mega Steno      ", 
PROGRAM="/etc/udev/apacer.sh %k %b %n", NAME="%c{1}", SYMLINK="%k %c{2} 
%c{3}"
22: BUS="scsi", SYSFS{vendor}="Apacer  ", PROGRAM="/etc/udev/apacer.sh %k %b 
%n", NAME="%c{1}", SYMLINK="%k %c{2} %c{3}"
23: BUS="scsi", SYSFS{vendor}="Apacer", PROGRAM="/etc/udev/apacer.sh %k %b 
%n", NAME="%c{1}", SYMLINK="%k %c{2} %c{3}"

related udev log:

configured rule in '/etc/udev/udev.rules' at line 21 applied, added symlink 
'%k %c{2} %c{3}'
configured rule in '/etc/udev/udev.rules' at line 21 applied, 'sda' becomes 
'%c{1}'
creating device node '/dev/scsi/host28/bus0/target0/lun0/disc'
configured rule in '/etc/udev/udev.rules' at line 21 applied, added symlink 
'%k %c{2} %c{3}'
configured rule in '/etc/udev/udev.rules' at line 21 applied, 'sdc' becomes 
'%c{1}'
creating device node '/dev/scsi/host28/bus0/target0/lun2/disc'
configured rule in '/etc/udev/udev.rules' at line 22 applied, added symlink 
'%k %c{2} %c{3}'
configured rule in '/etc/udev/udev.rules' at line 22 applied, 'sdb' becomes 
'%c{1}'
creating device node '/dev/scsi/host28/bus0/target0/lun1/disc'
configured rule in '/etc/udev/udev.rules' at line 23 applied, added symlink 
'%k %c{2} %c{3}'
configured rule in '/etc/udev/udev.rules' at line 23 applied, 'sda1' becomes 
'%c{1}'
creating device node '/dev/scsi/host28/bus0/target0/lun0/part1'

Why does every time match another rule?

Using udev 021 (from Debian unstable) and kernel 2.6.3.

Another topic is that device does not automatically report partitions, so man 
has to read appropriate device to get partitions.

- -- 
Regards
	Michal ÄŒihaÅ™
	http://cihar.com
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.2.4 (GNU/Linux)

iD8DBQFASxJG3DVS6DbnVgQRAjb1AKDXvj6ChkdblRraH0vkidN3uQfERACgkHu3
BoXQrnBG57RSh81OJ9skwdw=Y4Pt
-----END PGP SIGNATURE-----



-------------------------------------------------------
This SF.Net email is sponsored by: IBM Linux Tutorials
Free Linux tutorial presented by Daniel Robbins, President and CEO of
GenToo technologies. Learn everything from fundamentals to system
administration.http://ads.osdn.com/?ad_id\x1470&alloc_id638&opÌk
_______________________________________________
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] 23+ messages in thread

end of thread, other threads:[~2005-04-19  7:36 UTC | newest]

Thread overview: 23+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2004-03-07 12:15 udev problems Michal Čihař
2004-03-07 12:29 ` Kay Sievers
2004-03-07 12:47 ` Michal Čihař
2004-03-07 13:10 ` Michal Čihař
2004-03-07 13:44 ` Kay Sievers
2004-03-07 13:49 ` Michal Čihař
2004-03-07 14:05 ` Kay Sievers
2004-03-07 14:16 ` Kay Sievers
2004-03-07 14:20 ` Michal Čihař
2004-03-07 14:28 ` Kay Sievers
2004-03-07 14:30 ` Michal Čihař
2004-03-07 14:41 ` Kay Sievers
2004-03-07 14:43 ` Michal Čihař
2004-03-07 15:11 ` Michal Čihař
2004-03-07 15:28 ` Michal Čihař
2004-03-07 15:46 ` Michal Čihař
2005-04-18 18:13 ` clemens
2005-04-18 20:49 ` Greg KH
2005-04-18 21:02 ` David Zeuthen
2005-04-18 21:12 ` Greg KH
2005-04-18 21:27 ` clemens
2005-04-18 21:36 ` Kay Sievers
2005-04-19  7:36 ` clemens

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).