Annotation of /trunk/usbip/usbippolld
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: 607 byte(s)
Tue May 8 08:56:57 2007 UTC (17 years, 4 months ago) by niro
File size: 607 byte(s)
-variable config files
1 | niro | 139 | #!/bin/bash |
2 | |||
3 | niro | 140 | source /etc/conf.d/usbippolld |
4 | niro | 139 | |
5 | while true | ||
6 | do | ||
7 | niro | 140 | ALLCLIENTS=$(find ${USBIP_TEMP} -type f | sort) |
8 | niro | 139 | |
9 | for i in ${ALLCLIENTS} | ||
10 | do | ||
11 | client=$(basename ${i} .txt) | ||
12 | dev=$(< ${i}) | ||
13 | |||
14 | niro | 140 | if fping -q ${FPING_OPTS} ${client} |
15 | niro | 139 | then |
16 | echo "-- polling client ${client} on dev ${dev}" | ||
17 | usbip -a ${client} ${dev} | ||
18 | else | ||
19 | echo "-- client ${client} not found, removing from list" | ||
20 | |||
21 | out=$(mktemp) | ||
22 | port=$(portusbip -p &> ${out};grep -B3 -i "128.20.3.3" ${out} | grep Port | cut -d' ' -f2| sed "s|:||") | ||
23 | usbip -d ${port} | ||
24 | rm ${out} | ||
25 | rm ${tmp}/${client} | ||
26 | fi | ||
27 | |||
28 | niro | 140 | sleep ${USBIP_WAIT_TIMEOUT} |
29 | niro | 139 | done |
30 | done |
Properties
Name | Value |
---|---|
svn:executable | * |