[vox-tech] /etc/devfsd.conf equivalent for udev?
Jonathan Stickel
vox-tech@lists.lugod.org
Tue, 20 Apr 2004 09:15:55 -0700
Ken Bloom wrote:
>
> 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.
>
Thanks for the suggestion, but it's not working. Not a big deal; most
any time I sync, I open up jpilot anyway, and I can sync from there. I
just thought it was cool I could make it sync automatically with devfs.
Jonathan