On Sat, 2010-01-30 at 13:59 -0500, Paul Dugas wrote: > On Sat, Jan 30, 2010 at 1:27 PM, David Zeuthen <david@xxxxxxxx> wrote: > > You should be able to use IMPORT and $tempnode > > And it seems the idea of getting IDs from the devices themselves is > not off-the-wall at all. Sweet. I completely missed the $tempnode > entry in the man page. > > Is there a reason I should use IMPORT{program} instead of PROGRAM like so... > > KERNEL=="ttyUSB*", SYSFS{serial}=="111", \ > PROGRAM="logger_port $N", \ > SYMLINK+="ttyLogger1USB%c" > > I ask mainly because I'm not entirely sure what "environment key format" is. I'm not sure that the output of PROGRAM is parsed the same way it is for IMPORT - in fact, I think it's just ignored for PROGRAM - Kay? Anyway, the general idea is something like this SUBSYSTEM=="tty", SUBSYSTEMS=="usb", IMPORT{program}="logger_import $tempnode", SYMLINK+="ttyLogger$env{LOGGER_DEVICE_NUMBER}port $env{LOGGER_PORT_NUMBER}" where the logger_import program writes lines like this LOGGER_PORT_NUMBER=42 LOGGER_DEVICE_NUMBER=43 on stdout which is then imported into the environment for the device (and thus available for later rules and via libudev). David -- To unsubscribe from this list: send the line "unsubscribe linux-hotplug" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html