* usb pen usb.usermap problem
@ 2004-12-09 7:39 hy2
2004-12-09 13:10 ` hy2
` (3 more replies)
0 siblings, 4 replies; 5+ messages in thread
From: hy2 @ 2004-12-09 7:39 UTC (permalink / raw)
To: linux-hotplug
hy list,
i would run a bash script when i plug-in my usb pen.
the script is /etc/hotplug/usb/usb-stylo.
so i added this line to /etc/hotplug/usb.usermap.
usb-stilo 0x000f 0x0ea0 0x6803 0x0000 0x0000
0x00 0x00 0x00 0x00 0x00 0x00 0x00000000
i don't know how to set the 1th field (match_flags) but about
the 2th end 3th i'm sure they are right.
i restarted hotplug subsystem but nothing is happened.
hotpulg does not run the script.
how can i solve this ?
tnx, regards.
--
>here are more things in heaven and earth,
horatio, than are dreamt of in your philosophy.
-------------------------------------------------------
SF email is sponsored by - The IT Product Guide
Read honest & candid reviews on hundreds of IT Products from real users.
Discover which products truly live up to the hype. Start reading now.
http://productguide.itmanagersjournal.com/
_______________________________________________
Linux-hotplug-devel mailing list http://linux-hotplug.sourceforge.net
Linux-hotplug-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/linux-hotplug-devel
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: usb pen usb.usermap problem
2004-12-09 7:39 usb pen usb.usermap problem hy2
@ 2004-12-09 13:10 ` hy2
2004-12-09 14:09 ` hy2
` (2 subsequent siblings)
3 siblings, 0 replies; 5+ messages in thread
From: hy2 @ 2004-12-09 13:10 UTC (permalink / raw)
To: linux-hotplug
> usb-stylo != usb-stilo
> Spelling error?
language error, i'm italian :)
> > i don't know how to set the 1th field (match_flags) but about
> > the 2th end 3th i'm sure they are right.
> Look at /etc/hotplug/usb.agent:
yes, hight bash scripting.
i need to match vendor && product so i changed match_flags to
0x0003 (right?) and i have corrected the script name.
but if..
# lsusb
Bus 003 Device 005: ID 0ea0:6803 Ours Technology, Inc. OTI-6803 Flash Disk
is the target device plugged-in.
why the script /etc/hotplug/usb/usb-stylo is still ignored?
which kind of test can i perform to understand where my configuration fails?
best regards.
--
>here are more things in heaven and earth,
horatio, than are dreamt of in your philosophy.
-------------------------------------------------------
SF email is sponsored by - The IT Product Guide
Read honest & candid reviews on hundreds of IT Products from real users.
Discover which products truly live up to the hype. Start reading now.
http://productguide.itmanagersjournal.com/
_______________________________________________
Linux-hotplug-devel mailing list http://linux-hotplug.sourceforge.net
Linux-hotplug-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/linux-hotplug-devel
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: usb pen usb.usermap problem
2004-12-09 7:39 usb pen usb.usermap problem hy2
2004-12-09 13:10 ` hy2
@ 2004-12-09 14:09 ` hy2
2004-12-11 12:29 ` Kay Sievers
2004-12-11 14:26 ` Kay Sievers
3 siblings, 0 replies; 5+ messages in thread
From: hy2 @ 2004-12-09 14:09 UTC (permalink / raw)
To: linux-hotplug
> Just uncomment:
> # DEBUG=yes; export DEBUG
>
done.
this is the report:
Dec 9 14:58:01 alea default.hotplug[5728]: arguments (scsi) env (OLDPWD=/ DEVPATH=/devices/pci0000:00/0000:00:1d.1/usb3/3-1/3-1:1.0/host5/5:0:0:0 PATH=/bin:/sbin:/usr/sbin:/usr/bin ACTIONd PWD=/etc/hotplugHOME=/ SHLVL=2 DEBUG=yes SEQNUM‡6 _=/bin/env)
Dec 9 14:58:01 alea default.hotplug[5744]: no runnable /etc/hotplug/scsi_generic.agent is installed
Dec 9 14:58:01 alea default.hotplug[5728]: invoke /etc/hotplug/scsi.agent ()
Dec 9 14:58:01 alea scsi.agent[5728]: disk at /devices/pci0000:00/0000:00:1d.1/usb3/3-1/3-1:1.0/host5/5:0:0:0
Dec 9 14:58:02 alea usb.agent[5723]: Setup usb-stylo for USB product ea0/6803/100
Dec 9 14:58:02 alea usb.agent[5723]: Module setup usb-stylo for USB product ea0/6803/100
# ls -l scsi.agent
-rwxr-xr-x 1 root root 1459 Nov 20 07:08 scsi.agent
it is runnable !
# ls -l usb-stylo
-rwxr-xr-x 1 root root 64 Dec 9 15:02 usb-stylo
# cat usb-stylo
#!/bin/sh
mount /var/aes
echo good
echo test > /tmp/test-good # only this line works
the problem is in the mount command?
/dev/hda6 /var/aes jfs exec,user,noauto,encryption®s-256,loop=/dev/loop7,keygen=/home/hy2/bin/aes_key_gen 0 0
/home/hy2/bin/aes_key_gen
mounts the key and reads some bites used as passphrase for aes-256 cfs.
then it umounts the key.
if i run mount /var/aes all this works.
thank you very much. saiph
--
>here are more things in heaven and earth,
horatio, than are dreamt of in your philosophy.
-------------------------------------------------------
SF email is sponsored by - The IT Product Guide
Read honest & candid reviews on hundreds of IT Products from real users.
Discover which products truly live up to the hype. Start reading now.
http://productguide.itmanagersjournal.com/
_______________________________________________
Linux-hotplug-devel mailing list http://linux-hotplug.sourceforge.net
Linux-hotplug-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/linux-hotplug-devel
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: usb pen usb.usermap problem
2004-12-09 7:39 usb pen usb.usermap problem hy2
2004-12-09 13:10 ` hy2
2004-12-09 14:09 ` hy2
@ 2004-12-11 12:29 ` Kay Sievers
2004-12-11 14:26 ` Kay Sievers
3 siblings, 0 replies; 5+ messages in thread
From: Kay Sievers @ 2004-12-11 12:29 UTC (permalink / raw)
To: linux-hotplug
On Thu, 2004-12-09 at 08:39 +0100, hy2 wrote:
> hy list,
>
> i would run a bash script when i plug-in my usb pen.
> the script is /etc/hotplug/usb/usb-stylo.
>
> so i added this line to /etc/hotplug/usb.usermap.
>
> usb-stilo 0x000f 0x0ea0 0x6803 0x0000 0x0000 0x00 0x00 0x00 0x00 0x00 0x00 0x00000000
usb-stylo != usb-stilo
Spelling error?
> i don't know how to set the 1th field (match_flags) but about
> the 2th end 3th i'm sure they are right.
Look at /etc/hotplug/usb.agent:
USB_MATCH_VENDOR=$((0x0001))
USB_MATCH_PRODUCT=$((0x0002))
USB_MATCH_DEV_LO=$((0x0004))
USB_MATCH_DEV_HI=$((0x0008))
USB_MATCH_DEV_CLASS=$((0x0010))
USB_MATCH_DEV_SUBCLASS=$((0x0020))
USB_MATCH_DEV_PROTOCOL=$((0x0040))
USB_MATCH_INT_CLASS=$((0x0080))
USB_MATCH_INT_SUBCLASS=$((0x0100))
USB_MATCH_INT_PROTOCOL=$((0x0200))
Good luck,
Kay
-------------------------------------------------------
SF email is sponsored by - The IT Product Guide
Read honest & candid reviews on hundreds of IT Products from real users.
Discover which products truly live up to the hype. Start reading now.
http://productguide.itmanagersjournal.com/
_______________________________________________
Linux-hotplug-devel mailing list http://linux-hotplug.sourceforge.net
Linux-hotplug-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/linux-hotplug-devel
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: usb pen usb.usermap problem
2004-12-09 7:39 usb pen usb.usermap problem hy2
` (2 preceding siblings ...)
2004-12-11 12:29 ` Kay Sievers
@ 2004-12-11 14:26 ` Kay Sievers
3 siblings, 0 replies; 5+ messages in thread
From: Kay Sievers @ 2004-12-11 14:26 UTC (permalink / raw)
To: linux-hotplug
On Thu, 2004-12-09 at 14:10 +0100, hy2 wrote:
> > usb-stylo != usb-stilo
> > Spelling error?
> language error, i'm italian :)
:)
> > > i don't know how to set the 1th field (match_flags) but about
> > > the 2th end 3th i'm sure they are right.
> > Look at /etc/hotplug/usb.agent:
> yes, hight bash scripting.
>
> i need to match vendor && product so i changed match_flags to
> 0x0003 (right?) and i have corrected the script name.
Seems right.
> but if..
> # lsusb
> Bus 003 Device 005: ID 0ea0:6803 Ours Technology, Inc. OTI-6803 Flash Disk
>
> is the target device plugged-in.
> why the script /etc/hotplug/usb/usb-stylo is still ignored?
Is the script executable? Does it run if you call it from the
commandline?
> which kind of test can i perform to understand where my configuration fails?
Just uncomment:
# DEBUG=yes; export DEBUG
in /etc/hotplug/hotplug.functions.
Here is my test. Works by calling "my-mouse" which just logs the env:
default.hotplug[11643]: invoke /etc/hotplug/usb.agent ()
usb.agent[11643]: Setup my-mouse 0x06 0x06 for USB product 46d/c03e/2000
usb.agent[11643]: Module setup my-mouse for USB product 46d/c03e/2000
logger: SUBSYSTEM=usb WORKS=1 DEVPATH=/devices/pci0000:00/0000:00:1d.1/usb3/3-2/3-2:1.0 ...
Kay
-------------------------------------------------------
SF email is sponsored by - The IT Product Guide
Read honest & candid reviews on hundreds of IT Products from real users.
Discover which products truly live up to the hype. Start reading now.
http://productguide.itmanagersjournal.com/
_______________________________________________
Linux-hotplug-devel mailing list http://linux-hotplug.sourceforge.net
Linux-hotplug-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/linux-hotplug-devel
^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2004-12-11 14:26 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2004-12-09 7:39 usb pen usb.usermap problem hy2
2004-12-09 13:10 ` hy2
2004-12-09 14:09 ` hy2
2004-12-11 12:29 ` Kay Sievers
2004-12-11 14:26 ` Kay Sievers
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).