Changeset 997 for trunk

Show
Ignore:
Timestamp:
08/22/07 08:20:40 (17 months ago)
Author:
aj
Message:

commit changes so this code works without CONFIG_USB_DEVICEFS.

Location:
trunk/etc
Files:
3 modified

Legend:

Unmodified
Added
Removed
  • trunk/etc/openct.udev

    r990 r997  
    1313SUBSYSTEM!="usb", GOTO="openct_usb_rules_end" 
    1414ACTION!="add", GOTO="openct_usb_rules_end" 
     15 
     16# some distributions might not have a proper rule to set the name. 
     17# this is needed without USB_DEVICEFS the kernel doesn't tell us about 
     18# DEVICE. so we need to know the name of the device created by udev in 
     19# /dev/bus/usb. 
     20SUBSYSTEM=="usb", ACTION=="add", ENV{DEVTYPE}=="usb_device", \ 
     21        NAME="bus/usb/$env{BUSNUM}/$env{DEVNUM}", MODE="0644" 
    1522 
    1623# last file created by the kernel, if this is present everything should be 
  • trunk/etc/openct.udev.modalias

    r990 r997  
    1313SUBSYSTEM!="usb", GOTO="openct_usb_rules_end" 
    1414ACTION!="add", GOTO="openct_usb_rules_end" 
     15 
     16# some distributions might not have a proper rule to set the name. 
     17# this is needed without USB_DEVICEFS the kernel doesn't tell us about 
     18# DEVICE. so we need to know the name of the device created by udev in 
     19# /dev/bus/usb. 
     20SUBSYSTEM=="usb", ACTION=="add", ENV{DEVTYPE}=="usb_device", \ 
     21        NAME="bus/usb/$env{BUSNUM}/$env{DEVNUM}", MODE="0644" 
    1522 
    1623# egate 
  • trunk/etc/openct_usb.in

    r994 r997  
    22 
    33test "$ACTION" = "add" || exit 0 
    4 test -n "$DEVICE" -o -n "$DEVNAME" || exit 0  
    54test -e /var/run/openct/status || exit 0 
    65 
    76( 
     7 
     8# try to get the device path from udevinfo. 
     9if [ -z "$DEVICE" -a -u "$DEVNAME" ] 
     10then 
     11        if [ -z "$DEVPATH" ] 
     12        then 
     13                exit 0 
     14        fi 
     15        UDEVINFO="`udevinfo --query=name --path=$(dirname $DEVPATH)`" 
     16        if [ -z "$UDEVINFO" ] 
     17        then 
     18                exit 0 
     19        fi 
     20        DEVICE="/dev/$UDEVINFO" 
     21fi 
    822 
    923if [ -n "$DEVICE" ]