udev and jpilot-sync
Bill Moseley
moseley at hank.org
Sun Jan 20 21:55:10 UTC 2008
On Sun, Jan 20, 2008 at 12:07:34PM -0800, Bill Moseley wrote:
> I tried adding the udev rule above and appending:
>
> RUN+="su - moseley -c jpilot-sync"
Well, I found the rule that creates /dev/pilot and added a new rule:
KERNEL=="ttyUSB*", \
ATTRS{product}=="Palm Handheld*|Handspring *|palmOne Handheld", \
RUN+="/bin/su - moseley -c 'sleep 2; jpilot-sync'"
That syncs, but I don't think it's correct.
For one thing I seem to need the sleep to make it work, and it also
seems to match twice (and thus run the program twice):
1313 ? S< 0:00 /bin/su - moseley -c sleep 2; jpilot-sync
1318 ? S< 0:00 \_ -su -c sleep 2; jpilot-sync
1303 ? S< 0:00 /bin/su - moseley -c sleep 2; jpilot-sync
1304 ? S< 0:00 \_ -su -c sleep 2; jpilot-sync
1321 ? S< 0:00 \_ jpilot-sync
jpilot-sync uses a lock file, so one of them is waiting on the FLOCK
of the other.
Is there a better approach?
--
Bill Moseley
moseley at hank.org
More information about the ubuntu-users
mailing list