On 2004.04.19 08:51, Jonathan Stickel wrote:
I've just started using udev since devfs is supposedly deprecated in 2.6 kernels. It all seems to work OK, at least for my setup.
I since my handspring PDA through /dev/pilot, which now links to /dev/ tts/USB1. With devfs I added some lines to /etc/devfsd.conf which automatically ran my syncing program when I pushed the cradle button:
#configure USB, specifically so that jpilot syncs when Visor cradle button is pushed; JJS 12 Feb 04
REGISTER ^usb PERMISSIONS 0.0 0777
REGISTER ^usb/tts PERMISSIONS 0.0 0777
REGISTER ^usb/tts/1 EXECUTE /bin/su jjstickel -c "/usr/ bin/jpilot-sync"
I can't seem to find an equivalent file for udev. There exists /etc/ udev/udev.conf, udev.permissions, and udev.rules, but the contents are very different from devfsd.conf. Any ideas?
in /etc/udev.conf, there should be a configuration entry telling you which is the rules file. if it's a directory, then any file named *.rules in that directory will be read as a rules file (so it would be a good idea in that case to create something like /etc/udev/local.rules and add your own rules there)
You will probably want something like KERNEL="ttyUSB1", PROGRAM="/bin/su jjstickel -c \"/usr/bin/jpilot-sync\""
but I don't know for sure that the system would wait to run this rule until after it had created the device file. You might consider instead running jpilot-sync as a daemon with the -l option to keep it in a loop.
-- I usually have a GPG digital signature included as an attachment. See http://www.gnupg.org/ for info about these digital signatures. My key was last signed 10/14/2003. If you use GPG *please* see me about signing the key. ***** My computer can't give you viruses by email. ***
pgp00000.pgp
Description: PGP signature
