Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
Wie Skript beim Einstecken von pcmia-Karte ausführen?
View unanswered posts
View posts from last 24 hours
View posts from last 7 days

 
Reply to topic    Gentoo Forums Forum Index Deutsches Forum (German)
View previous topic :: View next topic  
Author Message
tuxian
l33t
l33t


Joined: 26 Jan 2004
Posts: 766
Location: Austria

PostPosted: Tue Nov 16, 2004 7:26 pm    Post subject: Wie Skript beim Einstecken von pcmia-Karte ausführen? Reply with quote

Hallo!

Wie kann ich ein Skript bzw. einen Befehl beim Einstecken meiner UMTS PCMCIA karte mittels hotplug ausführen?

Also beim Einstecken erscheint:

Code:
PCI: Enabling device 0000:03:00.0 (0000 -> 0002)
ACPI: PCI interrupt 0000:03:00.0[A] -> GSI 11 (level, low) -> IRQ 11
ohci_hcd 0000:03:00.0: OPTi Inc. 82C861
PCI: Setting latency timer of device 0000:03:00.0 to 64
ohci_hcd 0000:03:00.0: irq 11, pci mem e1cfe000
ohci_hcd 0000:03:00.0: new USB bus registered, assigned bus number 5
ohci_hcd 0000:03:00.0: WARNING: OPTi workarounds unavailable
hub 5-0:1.0: USB hub found
hub 5-0:1.0: 2 ports detected
usb 5-1: new low speed USB device using address 2
usb 5-1: device not accepting address 2, error -110
usb 5-1: new low speed USB device using address 3
usb 5-1: device not accepting address 3, error -110
ohci_hcd 0000:03:00.0: wakeup


Die PCMCIA Karte wird also als USB-Gerät (Modem) erkannt und kann über /dev/usb/tts/0 angesprochen werden.
Back to top
View user's profile Send private message
steveb
Advocate
Advocate


Joined: 18 Sep 2002
Posts: 4564

PostPosted: Tue Nov 16, 2004 8:57 pm    Post subject: Reply with quote

schau doch mal /etc/hotplug/usb/usbcam an und dort wirst du sehen, wie do so was bewerkstelligen kannst.


gruss

steve
Back to top
View user's profile Send private message
tuxian
l33t
l33t


Joined: 26 Jan 2004
Posts: 766
Location: Austria

PostPosted: Tue Nov 16, 2004 9:53 pm    Post subject: Reply with quote

Die Datei gibts bei mir nicht:

Code:
root@laptop: pts/2: 21 files 141Mb -> tree /etc/hotplug
/etc/hotplug
|-- blacklist
|-- blacklist.d
|   `-- 55-slmodem
|-- dasd.agent
|-- dasd.permissions
|-- firmware.agent
|-- hotplug.functions
|-- ieee1394.agent
|-- input.agent
|-- input.rc
|-- isapnp.rc
|-- net.agent
|-- pci
|-- pci.agent
|-- pci.rc
|-- pnp.distmap
|-- pnp.rc
|-- scsi.agent
|-- tape.agent
|-- tape.permissions
|-- usb
|-- usb.agent
|-- usb.distmap
|-- usb.handmap
|-- usb.rc
`-- usb.usermap

3 directories, 23 files

Die Nov 16 22:52:22 CET 2004


:roll:
Back to top
View user's profile Send private message
steveb
Advocate
Advocate


Joined: 18 Sep 2002
Posts: 4564

PostPosted: Tue Nov 16, 2004 10:14 pm    Post subject: Reply with quote

/etc/hotplug/usb/usbcam:
Code:
#!/bin/bash
# $Id: usbcam.console,v 1.4 2002/09/12 16:50:18 hun Exp $
#
# /etc/hotplug/usb/usbcam
#
# Sets up newly plugged in USB camera so that the user who owns
# the console according to pam_console can access it from user space
#
# Note that for this script to work, you'll need all of the following:
# a) a line in the file /etc/hotplug/usermap that corresponds to the
#    camera you are using. You can get the correct lines for all cameras
#    supported by libgphoto2 by running "print-usb-usermap".
# b) a setup using pam_console creates the respective lock files
#    containing the name of the respective user. You can check for that
#    by executing "echo `cat /var/{run,lock}/console.lock`" and
#    verifying the appropriate user is mentioned somewhere there.
# c) a Linux kernel supporting hotplug and usbdevfs
# d) the hotplug package (http://linux-hotplug.sourceforge.net/)
#
# In the usermap file, the first field "usb module" should be named
# "usbcam" like this script.
#

if [ "${ACTION}" = "add" ] && [ -f "${DEVICE}" ]
then
    # New code, using lock files instead of copying /dev/console permissions
    # This also works with non-gdm logins (e.g. on a virtual terminal)
    # Idea and code from Nalin Dahyabhai <nalin@redhat.com>
    if [ -f /var/run/console.lock ]
    then
        CONSOLEOWNER=`cat /var/run/console.lock`
    elif [ -f /var/lock/console.lock ]
    then
        CONSOLEOWNER=`cat /var/lock/console.lock`
    else
        CONSOLEOWNER=
    fi
    if [ -n "$CONSOLEOWNER" ]
    then
        chmod 0000 "${DEVICE}"
        chown "$CONSOLEOWNER" "${DEVICE}"
        chmod 0600 "${DEVICE}"
    fi
fi
Back to top
View user's profile Send private message
tuxian
l33t
l33t


Joined: 26 Jan 2004
Posts: 766
Location: Austria

PostPosted: Tue Nov 16, 2004 11:04 pm    Post subject: Reply with quote

Okay, danke habs hinbekommen.

Siehe https://forums.gentoo.org/viewtopic.php?p=1701957
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Deutsches Forum (German) All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum