Here is the, I am guessing cosmetic, problem: chutz@lion ~ $ udevinfo -q all -n /dev/cdroms/nec P: /block/hdd N: hdd S: cdroms/nec S: S: cdrom S: cdrw S: dvd S: dvdrw chutz@lion ~ $ udevinfo -q all -n /dev/cdroms/pioneer P: /block/sr0 N: sr0 S: cdroms/pioneer S: S: cdrom1 S: dvd1 chutz@lion ~ $ udevinfo -q all -n /dev/cdroms/plextor P: /block/sr1 N: sr1 S: cdroms/plextor S: S: cdrom2 S: cdrw1 Steps to reproduce: 1. add a rule for your udev to find BUS=="ide", KERNEL=="hd[a-z]", PROGRAM="/etc/udev/scripts/cdsymlinks.sh %k", SYMLINK+="%c{1] %c{2] %c{3} %c{4} %c{5} %c{6}" 2. attach an IDE cd-rom (for simplicity) 3. run udevstart 4. udevinfo -q all -n /dev/cdrom The problem is that: - cdsymlinks.sh outputs every symlink prefixed with a space. - udev_rules.c assumes that the initial space is a delimiter and adds an empty symlink - udev_rules.c would also fail if its parameters are delimited with multiple spaces or if there is a trailing space This is how I solved the problem for now: --- udev-061/udev_utils.c 2005-07-07 10:01:21.000000000 +0900 +++ udev-061/udev_utils.c.new 2005-07-07 10:01:16.000000000 +0900 @@ -302,6 +302,7 @@ int name_list_add(struct list_head *name struct name_entry *loop_name; struct name_entry *new_name; + if (strlen(name) == 0) return 0; list_for_each_entry(loop_name, name_list, node) { /* avoid doubles */ if (strcmp(loop_name->name, name) == 0) { Tested and working. I was not sure if name_list_add should refuse empty parameters, or if the parser should be smarter, so I went for the one that introduces less changes. This also made me think. Does the default rule have to be "%c{1} %c{2} %c{3}..." when "%c" does the same job and is also future proof (for when there are 50 links output by the script)?
changing the subject : rules -> symlinks
Yes, %c would be better. I'll look into checking in your patch too, many thanks.
Fixed in 062 release