Bug 174391 - Include udev files to enable auto-connect on hotplug
Summary: Include udev files to enable auto-connect on hotplug
Keywords:
Status: CLOSED NEXTRELEASE
Alias: None
Product: Fedora
Classification: Fedora
Component: synce
Version: 4
Hardware: i386
OS: Linux
medium
medium
Target Milestone: ---
Assignee: Andreas Bierfert
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2005-11-28 19:14 UTC by Aurelien Bompard
Modified: 2007-11-30 22:11 UTC (History)
1 user (show)

Fixed In Version:
Doc Type: Enhancement
Doc Text:
Clone Of:
Environment:
Last Closed: 2005-11-28 21:48:28 UTC
Type: ---
Embargoed:


Attachments (Terms of Use)
synce.dev : script executed on plug (402 bytes, text/plain)
2005-11-28 19:20 UTC, Aurelien Bompard
no flags Details
Patch to the spec file to enable all this (2.48 KB, patch)
2005-11-28 19:39 UTC, Aurelien Bompard
no flags Details | Diff

Description Aurelien Bompard 2005-11-28 19:14:44 UTC
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 :
------8<---------8<---------
#!/bin/sh

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"
fi
------8<---------8<---------

- 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):
0.9.1-3

How reproducible:
Always

Steps to Reproduce:
1. N/A
  

Additional info:

Comment 1 Aurelien Bompard 2005-11-28 19:20:50 UTC
Created attachment 121558 [details]
synce.dev : script executed on plug

Comment 2 Aurelien Bompard 2005-11-28 19:39:24 UTC
Created attachment 121559 [details]
Patch to the spec file to enable all this

Comment 3 Andreas Bierfert 2005-11-28 21:48:28 UTC
Thanks for this great bug report :)


Note You need to log in before you can comment on or make changes to this bug.