Marco d'Itri wrote:
With udev 0.076-2 the delay during boot is gone, but the hanging udev process, and the delayed creation of /dev/hdg{,1}, are still present.
Can you check why /lib/udev/ide.agent is not working?
Add some echo statements and try to run it like:

DEVPATH='/devices/pci0000:00/0000:00:0f.1/ide2/1.1' /lib/udev/ide.agent

(Use the right $DEVPATH for hdg.)
Ok, it seems to be the calculation of the device name:

+ '[' -z /devices/pci0000:00/0000:00:0b.0/ide3/3.0 ']'
+ device=3.0
+ drive=0
+ bus=3
++ printf hd%x 16
+ name=hd10
+ procfile=/proc/ide/hd10/media
+ wait_for_file /proc/ide/hd10/media
+ local file=/proc/ide/hd10/media
+ local timeout=
+ '[' '' ']'
+ timeout=120
+ local count=120
+ '[' 120 '!=' 0 ']'
+ '[' -e /proc/ide/hd10/media ']'
+ sleep 1

I came up with the following code that works fine in Bash, although I don't know whether substring expansion is a Bash extension. It does work fine when I 'set -o posix', though:
--- ide.agent.orig      2005-11-26 12:58:16.000000000 +0000
+++ ide.agent   2005-11-26 13:25:57.000000000 +0000
@@ -11,10 +11,13 @@
     exit 1
 fi

+driveletters=abcdefghijklmnopqrstuvwxyz
+
 device=${DEVPATH#/devices/*/ide?/}
 drive=${device#?.}
 bus=${device%.?}
-name=$(printf "hd%x" $(($drive + $bus * 2 + 10)))
+index=$(($bus * 2 + $drive))
+name=hd${driveletters:$index:1}
 procfile="/proc/ide/$name/media"

 wait_for_file $procfile

If this turns out not to be portable to other shells, it might be easier to use readlink to read the target of the /sys/$DEVPATH/block symlink:
 $ link=$(readlink /sys/$DEVPATH/block)
 $ echo ${link##*/}
 hdg

--
Sam Morris
http://robots.org.uk/

PGP key id 5EA01078
3412 EA18 1277 354B 991B  C869 B219 7FDB 5EA0 1078


--
To UNSUBSCRIBE, email to [EMAIL PROTECTED]
with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]

Reply via email to