usb pen usb.usermap problem
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 0x00000x00 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.
Quoted 1 line
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
[email protected]
https://lists.sourceforge.net/lists/listinfo/linux-hotplug-devel
Quoted 2 lines
usb-stylo != usb-stilo
Spelling error?
language error, i'm italian :)
Quoted 3 lines
Quoted 2 lines
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.
Quoted 1 line
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
[email protected]
https://lists.sourceforge.net/lists/listinfo/linux-hotplug-devel
Quoted 5 lines
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
Quoted 1 line
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
[email protected]
https://lists.sourceforge.net/lists/listinfo/linux-hotplug-devel
Quoted 8 lines · 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
0x000f0x0ea00x68030x00000x00000x000x000x000x000x000x000x00000000
usb-stylo != usb-stilo
Spelling error?
Quoted 2 lines
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
[email protected]
https://lists.sourceforge.net/lists/listinfo/linux-hotplug-devel
Quoted 3 lines · On Thu, 2004-12-09 at 14:10 +0100, hy2 wrote:
Quoted 2 lines
usb-stylo != usb-stilo
Spelling error?language error, i'm italian :)
:)
Quoted 7 lines
Quoted 3 lines
Quoted 2 lines
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_flagsto0x0003(right?) and i have corrected the script name.
Seems right.
Quoted 6 lines
but if..
# lsusb Bus 003 Device 005: ID 0ea0:6803 Ours Technology, Inc. OTI-6803 Flash Diskis the target device plugged-in.
why the script/etc/hotplug/usb/usb-stylois still ignored?
Is the script executable? Does it run if you call it from the commandline?
Quoted 1 line
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
[email protected]
https://lists.sourceforge.net/lists/listinfo/linux-hotplug-devel