You are not logged in.

#1 2007-07-08 07:27:11

TheAngryAmoeba
Member
Registered: 2006-11-01
Posts: 7

Udev automatic sync

Alright. So This should be straight forward. I am trying to setup udev to automatically sync my palmpilot when I hit the hotsync button on my pilot.

I created a udev rule for my palm pilot.

/etc/udev/rules.d/pilot.rules reads

BUS=="usb", SYSFS{product}=="Palm Handheld*|Handspring *", KERNEL=="ttyUSB1", NAME="ttyUSB1", SYMLINK="pilot", GROUP="user", MODE="0666", RUN+="/home/whiplash/sync.sh"

/home/whiplash/sync.sh

/usr/bin/jpilot-sync
aplay apple.wav

When I hit the hotsync button on my pilot, /dev/pilot shows up, and I can sync my pilot. with the sync script. However, this does not happen automatically. What am I overlooking?

Offline

#2 2007-07-08 17:41:20

brebs
Member
Registered: 2007-04-03
Posts: 3,742

Re: Udev automatic sync

See thread - notice the delaying loop and sleep command.

Offline

#3 2007-07-08 18:25:48

retsaw
Member
From: London, UK
Registered: 2005-03-22
Posts: 132

Re: Udev automatic sync

A script should have "#!" followed by the full path of the interpreter as the first line and should also be made executable.  That means the first line of your script should be "#!/bin/sh" or "#!/bin/bash".

Maybe you have done this, but you haven't explicitly stated you have, so I thought I should point it out.

Offline

#4 2007-07-12 07:34:33

TheAngryAmoeba
Member
Registered: 2006-11-01
Posts: 7

Re: Udev automatic sync

I had set the script to executable but I did not put in #!/bin/bash. I honestly didn't know that it was nesesary.

I added it to my script, but It still isn't working...:/

Offline

#5 2007-07-12 20:10:09

mehldutt
Member
From: Germany
Registered: 2006-01-08
Posts: 128

Re: Udev automatic sync

Instead of writing a script and a udev-rule I start jpilot in a daemon typ mode:

jpilot-sync -l

This allows jpilot-sync to run in the background to pick up the sync request.

How do you like that ? wink

Gary

Offline

Board footer

Powered by FluxBB