Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 73951 - Adding th hotplug script to autostart synce-serial-start fo synce ebuild
Summary: Adding th hotplug script to autostart synce-serial-start fo synce ebuild
Status: RESOLVED INVALID
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: High enhancement (vote)
Assignee: Greg Kroah-Hartman (RETIRED)
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2004-12-09 14:52 UTC by Flavio Campana
Modified: 2005-04-24 11:50 UTC (History)
0 users

See Also:
Package list:
Runtime testing required: ---


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Flavio Campana 2004-12-09 14:52:26 UTC
It's possible, using a script created in /etc/hotplug/usb/ and adding a line in /etc/hotplug/usb.usermap, to autostart synce-serial-start; is it possible to add it to the synce ebuild, maybe with an hotplug USE?
But then the user should be warned that synce-serial-start should not be used manually.

Reproducible: Always
Steps to Reproduce:
1. su to gain root privilege
2. Use synce-serial-config to configure the right dev
3. add to /etc/hotplug/usb.usermap the line : synce   0x0003  0xVVVV  0xPPPP  0x00    0x00    0x00    0x00    0x00    0x00    0x00    0x00    0x00 where VVVv must be replaced with vendorid and PPPP with productid (lsusb to see them)
4.create /etc/hotplug/usb/synce with this script in it:
#!/bin/bash
 
export time=`date +"%b %d %X"`
export uname=`uname -n`
 
echo "$time $uname $0: iPAQ added" >> /var/log/synce
synce-serial-abort >> /dev/null
synce-serial-start >> /var/log/synce
 
:> $REMOVER
echo "export time=\`date +\"%b %d %X\"\`" >> $REMOVER
echo "export uname=\`uname -n\`" >> $REMOVER
echo "echo \"\$time \$uname $0: iPAQ removed\" >> /var/log/synce" >> $REMOVER
echo "sleep 15 >> /var/log/synce" >> $REMOVER
echo "synce-serial-abort >> /var/log/synce" >> $REMOVER
chmod +x $REMOVER

5. chmod +x /etc/hotplug/usb/synce

Actual Results:  
the device will connect and sync automatically when it is plugged in

Expected Results:  
i tried it myself

Portage 2.0.51-r8 (default-linux/x86/2004.3, gcc-3.3.4, glibc-2.3.4.20041102-r0,
2.6.9-gentoo-r4 i686)
=================================================================
System uname: 2.6.9-gentoo-r4 i686 AMD Athlon(TM) XP 3200+
Gentoo Base System version 1.6.7
Python:              dev-lang/python-2.3.4 [2.3.4 (#1, Oct 24 2004, 12:15:55)]
dev-lang/python:     2.3.4
sys-devel/autoconf:  2.59-r5
sys-devel/automake:  1.8.5-r1
sys-devel/binutils:  2.15.92.0.2-r1
sys-devel/libtool:   1.5.2-r7
virtual/os-headers:  2.6.8.1-r1
ACCEPT_KEYWORDS="x86 ~x86"
AUTOCLEAN="yes"
CFLAGS="-march=athlon-xp -m3dnow -msse -mfpmath=387 -mmmx -O3 -pipe -fforce-addr
-falign-functions=64 -falign-jumps=16 -maccumulate-outgoing-args -ffast-math
-fprefetch-loop-arrays"
CHOST="i686-pc-linux-gnu"
CONFIG_PROTECT="/etc /usr/X11R6/lib/X11/xkb /usr/kde/2/share/config
/usr/kde/3.3/env /usr/kde/3.3/share/config /usr/kde/3.3/shutdown
/usr/kde/3/share/config /usr/share/config /var/qmail/control"
CONFIG_PROTECT_MASK="/etc/gconf /etc/terminfo /etc/env.d"
CXXFLAGS="-march=athlon-xp -m3dnow -msse -mfpmath=387 -mmmx -O3 -pipe
-fforce-addr -falign-functions=64 -falign-jumps=16 -maccumulate-outgoing-args
-ffast-math-fprefetch-loop-arrays"
DISTDIR="/usr/portage/distfiles"
FEATURES="autoaddcvs autoconfig ccache distlocks sandbox sfperms"
GENTOO_MIRRORS="ftp://mirror.switch.ch/mirror/gentoo/
http://mirror.switch.ch/mirror/gentoo/
ftp://212.219.56.152/sites/www.ibiblio.org/gentoo/
http://ftp.linux.ee/pub/gentoo/distfiles/ http://195.56.77.10/"
MAKEOPTS="-j2"
PKGDIR="/usr/portage/packages"
PORTAGE_TMPDIR="/var/tmp"
PORTDIR="/usr/portage"
PORTDIR_OVERLAY="/usr/local/portage"
SYNC="rsync://rsync.gentoo.org/gentoo-portage"
USE="3dnow X acpi aim alsa apache2 apm arts avi bitmap-fonts cdr crypt cups
divx4linux dvd encode esd evo f77 fam flac foomaticdb fortran ftp gd gif gpm gtk
gtk2 icq imagemagick imap imlib jabber java jpeg junit kde libg++ libwww mad
mikmod ming mmx mng motif mpeg mysql ncurses nls nptl nvidia oggvorbis openal
opengl oss pam pda pdflib perl png python qt quicktime readline real samba sdl
spell sse ssl svg svga tcltk tcpd tiff truetype x86 xml2 xmms xv xvid yahoo zlib"
Comment 1 Greg Kroah-Hartman (RETIRED) gentoo-dev 2005-04-24 11:50:37 UTC
No, this should be a udev rule or /etc/dev.d/ script, not a hotplug usermap modification.