Magellan Linux

Annotation of /trunk/usbip/usbipdevd

Parent Directory Parent Directory | Revision Log Revision Log


Revision 176 - (hide annotations) (download)
Wed May 9 15:06:06 2007 UTC (17 years ago) by niro
File size: 838 byte(s)
-typo

1 niro 139 #!/bin/bash
2    
3 niro 140 source /etc/conf.d/usbipdevd
4    
5 niro 139 CLIENTIP=$(/sbin/ifconfig eth0 | sed -n '/addr:/s/ [^r]*..//gp')
6 niro 140 install -d ${USBIP_TEMP}
7 niro 139
8     while true
9     do
10 niro 140 BUSID=$(bind_driver --list | grep -i ${USBIP_DEVICE_ID} | cut -d ' ' -f4)
11 niro 139
12     if [[ -n ${BUSID} ]]
13     then
14     echo "BUSID: ${BUSID}"
15    
16     # abort is nothing has changed
17 niro 140 if [[ -f ${USBIP_TEMP}/${CLIENTIP} ]] &&
18     [[ ${BUSID} = $(< ${USBIP_TEMP}/${CLIENTIP}) ]]
19 niro 139 then
20     echo "USBID is the same; nothing changed"
21     #exit 0
22     else
23     echo "exporting Logitech Pen with ID ${BUSID}"
24     bind_driver --usbip ${BUSID}
25    
26 niro 140 echo "${BUSID}" > ${USBIP_TEMP}/${CLIENTIP}
27 niro 176 scp ${USBIP_TEMP}/${CLIENTIP} root@${USBIP_SERVER}:${USBIP_SERVER_PATH}
28 niro 140 [[ -d ${USBIP_TEMP} ]] && rm -rf ${USBIP_TEMP}
29 niro 139 fi
30     else
31 niro 140 echo "No Logitech Pen (${USBIP_DEVICE_ID}) found ..."
32 niro 139 fi
33    
34 niro 140 sleep ${USBIP_WAIT_TIMEOUT}
35 niro 139 done

Properties

Name Value
svn:executable *