Annotation of /trunk/usbip/usbipdevd
Parent Directory | Revision Log
Revision 140 -
(hide annotations)
(download)
Tue May 8 08:56:57 2007 UTC (17 years, 4 months ago) by niro
File size: 829 byte(s)
Tue May 8 08:56:57 2007 UTC (17 years, 4 months ago) by niro
File size: 829 byte(s)
-variable config files
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 | scp ${USBIP_TEMP}/${CLIENTIP} root@${SERVER}:/root/usbclients/ | ||
28 | [[ -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 | * |