From mboxrd@z Thu Jan 1 00:00:00 1970 From: Michal =?utf-8?q?=C4=8Ciha=C5=99?= Date: Sun, 07 Mar 2004 12:15:02 +0000 Subject: udev problems Message-Id: <200403071315.02925.michal@cihar.com> List-Id: MIME-Version: 1.0 Content-Type: text/plain; charset="windows-1252" Content-Transfer-Encoding: quoted-printable To: linux-hotplug@vger.kernel.org -----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) an= d=20 I wanted to have permanent name for it. Okay, lets create some rule in=20 udev.rules and script that will generate it. Sometimes the name was generat= ed=20 correctly and sometimes not. Afer some experiments I got three rules, that = seem to work (with line numbers): 21: BUS=3D"scsi", SYSFS{vendor}=3D"Apacer ", SYSFS{model}=3D"Mega Steno = ",=20 PROGRAM=3D"/etc/udev/apacer.sh %k %b %n", NAME=3D"%c{1}", SYMLINK=3D"%k %c{= 2}=20 %c{3}" 22: BUS=3D"scsi", SYSFS{vendor}=3D"Apacer ", PROGRAM=3D"/etc/udev/apacer.s= h %k %b=20 %n", NAME=3D"%c{1}", SYMLINK=3D"%k %c{2} %c{3}" 23: BUS=3D"scsi", SYSFS{vendor}=3D"Apacer", PROGRAM=3D"/etc/udev/apacer.sh = %k %b=20 %n", NAME=3D"%c{1}", SYMLINK=3D"%k %c{2} %c{3}" related udev log: configured rule in '/etc/udev/udev.rules' at line 21 applied, added symlink= =20 '%k %c{2} %c{3}' configured rule in '/etc/udev/udev.rules' at line 21 applied, 'sda' becomes= =20 '%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= =20 '%k %c{2} %c{3}' configured rule in '/etc/udev/udev.rules' at line 21 applied, 'sdc' becomes= =20 '%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= =20 '%k %c{2} %c{3}' configured rule in '/etc/udev/udev.rules' at line 22 applied, 'sdb' becomes= =20 '%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= =20 '%k %c{2} %c{3}' configured rule in '/etc/udev/udev.rules' at line 23 applied, 'sda1' become= s=20 '%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 m= an=20 has to read appropriate device to get partitions. - --=20 Regards Michal =C4=8Ciha=C5=99 http://cihar.com -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.2.4 (GNU/Linux) iD8DBQFASxJG3DVS6DbnVgQRAjb1AKDXvj6ChkdblRraH0vkidN3uQfERACgkHu3 BoXQrnBG57RSh81OJ9skwdw=3DY4Pt -----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=1470&alloc_id638&op=CCk _______________________________________________ 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