RESULT is not matching
Hi,
I've written a couple of udev.rules that should identify 2 disks using the UUID obtained from scsi_id. I have been running udev.debug and checking the debug information out to /var/log/messages and I find that the output from scsi_id never matches my RESULT ... even though i think it should.
So here are the rules:
BUS="scsi", PROGRAM="/sbin/scsi_id -g -s /block/%k", RESULT="200000e1100a35065", NAME="disk-sda%n"
BUS="scsi", RESULT="200000e1100a34fef", NAME="disk-sdb%n"
BUS="scsi", RESULT="3600508b4000151bf0001e000015b0000", NAME="sues-sdc", SYMLINK="tester" BUS="scsi", RESULT="3600508b4000151bf0001e00001610000", NAME="sues-sdd"
And here are a few of the lines from the messages file ...
Jun 23 01:04:00 rx1620-1 udev[12450]: namedev_name_device: process rule Jun 23 01:04:00 rx1620-1 udev[12450]: match_rule: check for BUS dev->bus='scsi' sysfs_device->bus='scsi' Jun 23 01:04:00 rx1620-1 udev[12450]: match_rule: BUS matches Jun 23 01:04:00 rx1620-1 udev[12450]: match_rule: check for RESULT dev->result='3600508b4000151bf0001e00001610000', udev->program_result='3600508b4000151bf0001e00001610000 ' Jun 23 01:04:00 rx1620-1 udev[12450]: match_rule: RESULT is not matching
As can be seen from the log it looks like there is some space or \n or something being put at the end of the string in program_result and that is the reason that there is no match. But surely everybody is using scsi_id in this way aren't they ? BTW if it helps any, on on SLES9 (still without SP1) with all the udev stuff that comes with it...
Any ideas what's going wrong here ?
thanks and regards,
Sue
Lycos email has now 300 Megabytes of free storage... Get it now at mail.lycos.co.uk
Quoted 19 lines · On Wed, Jun 22, 2005 at 10:28:34PM +0000, (' wrote:
<html><head><style type="text/css">body{font:12px Arial;margin:3px;overflow-y:auto;overflow-x:auto}p{margin:0px;}blockquote, ol, ul{margin-top:0px;margin-bottom:0px;}</style></head>
<body><div style="display: block; font-family: Arial; font-size: 12px;">Hi,<br>
<br>
I've written a couple of udev.rules that should identify 2 disks using
the UUID obtained fromscsi_id. I have been running udev.debug and
checking the debug information out to/var/log/messagesand I find that
the output fromscsi_idnever matches my RESULT ... even though i think
it should.<br>
<br>
So here are the rules:<br>
BUS="scsi", PROGRAM="/sbin/scsi_id -g -s /block/%k", RESULT="200000e1100a35065", NAME="disk-sda%n"<br> <br>
BUS="scsi", RESULT="200000e1100a34fef", NAME="disk-sdb%n"<br>
BUS="scsi", RESULT="3600508b4000151bf0001e000015b0000", NAME="sues-sdc", SYMLINK="tester"<br> BUS="scsi", RESULT="3600508b4000151bf0001e00001610000", NAME="sues-sdd"<br>
<br>
And here are a few of the lines from the messages file ...<br>
<br>
Quoted 6 lines
Jun 23 01:04:00 rx1620-1 udev[12450]: namedev_name_device: process rule<br> Jun 23 01:04:00 rx1620-1 udev[12450]: match_rule: check for BUS dev->bus='scsi' sysfs_device->bus='scsi'<br> Jun 23 01:04:00 rx1620-1 udev[12450]: match_rule: BUS matches<br> Jun 23 01:04:00 rx1620-1 udev[12450]: match_rule: check for RESULTdev->result='3600508b4000151bf0001e00001610000', udev->program_result='3600508b4000151bf0001e00001610000 '<br>
Please try if RESULT="200000e1100a35065*" works.
Kay
-------------------------------------------------------
SF.Net email is sponsored by: Discover Easy Linux Migration Strategies from IBM. Find simple to follow Roadmaps, straightforward articles, informative Webcasts and more! Get everything you need to get up to speed, fast. http://ads.osdn.com/?ad_idt77&alloc_id492&op=click
_______________________________________________
Linux-hotplug-devel mailing list http://linux-hotplug.sourceforge.net
[email protected]
https://lists.sourceforge.net/lists/listinfo/linux-hotplug-devel