Red Hat Bugzilla – Bug 174391
Include udev files to enable auto-connect on hotplug
Last modified: 2007-11-30 17:11:18 EST
From Bugzilla Helper:
User-Agent: Mozilla/5.0 (X11; U; Linux i686; fr; rv:1.7.12) Gecko/20050922 Fedora/1.0.7-1.1.fc4 Firefox/1.0.7
Description of problem:
When I connect the handheld to the cradle, I have to run synce-serial-start to start the connection. The following files make udev run the program automatically when the handheld is plugged in.
Here's what we need:
- a file in /etc/udev/rules.d/ called 20-ipaq.rules containing this line:
DRIVER="ipaq", NAME="ipaq", SYMLINK="ttyUSB%n"
It will match any handheld using the ipaq driver, create a device /dev/ipaq, and create a symlink /dev/ttyUSB0 for compatibility.
- a script in /etc/udev/scripts called synce.dev :
if [ "$ACTION" = "add" ] ; then
/usr/bin/logger -p kern.info -t synce "iPAQ plugged, starting connection..."
# start the connection, and remove empty lines from output (to keep the log clean)
synce-serial-start | grep -v "^$" | /usr/bin/logger -p kern.info -t synce
elif [ "$ACTION" = "remove" ] ; then
/usr/bin/logger -p kern.info -t synce "iPAQ removed"
- the directory in /etc/dev.d/ipaq containing a symlink to the synce.dev script:
# ll /etc/dev.d/ipaq
lrwxrwxrwx 1 root root 28 nov 28 19:23 synce.dev -> ../../udev/scripts/synce.dev
- That's all. To get started, all the user has to do is to run "synce-serial-config ipaq" as root. This could be documented in a README in the package.
I'm going to post the script and a patch to the spec file to enable all this.
Version-Release number of selected component (if applicable):
Steps to Reproduce:
Created attachment 121558 [details]
synce.dev : script executed on plug
Created attachment 121559 [details]
Patch to the spec file to enable all this
Thanks for this great bug report :)