Contents of /trunk/usbip/usbippolld
Parent Directory | Revision Log
Revision 140 -
(show annotations)
(download)
Tue May 8 08:56:57 2007 UTC (17 years, 6 months ago) by niro
File size: 607 byte(s)
Tue May 8 08:56:57 2007 UTC (17 years, 6 months ago) by niro
File size: 607 byte(s)
-variable config files
1 | #!/bin/bash |
2 | |
3 | source /etc/conf.d/usbippolld |
4 | |
5 | while true |
6 | do |
7 | ALLCLIENTS=$(find ${USBIP_TEMP} -type f | sort) |
8 | |
9 | for i in ${ALLCLIENTS} |
10 | do |
11 | client=$(basename ${i} .txt) |
12 | dev=$(< ${i}) |
13 | |
14 | if fping -q ${FPING_OPTS} ${client} |
15 | 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 | sleep ${USBIP_WAIT_TIMEOUT} |
29 | done |
30 | done |
Properties
Name | Value |
---|---|
svn:executable | * |