Magellan Linux

Annotation of /trunk/usbip/usbippolld

Parent Directory Parent Directory | Revision Log Revision Log


Revision 139 - (hide annotations) (download)
Tue May 8 07:28:12 2007 UTC (17 years ago) by niro
File size: 578 byte(s)
-import of development scripts

1 niro 139 #!/bin/bash
2    
3    
4     tmp=/root/usbclients
5     waitt=10
6    
7     while true
8     do
9     ALLCLIENTS=$(find ${tmp} -type f | sort)
10    
11     for i in ${ALLCLIENTS}
12     do
13     client=$(basename ${i} .txt)
14     dev=$(< ${i})
15    
16     if fping -q -t50 ${client}
17     then
18     echo "-- polling client ${client} on dev ${dev}"
19     usbip -a ${client} ${dev}
20     else
21     echo "-- client ${client} not found, removing from list"
22    
23     out=$(mktemp)
24     port=$(portusbip -p &> ${out};grep -B3 -i "128.20.3.3" ${out} | grep Port | cut -d' ' -f2| sed "s|:||")
25     usbip -d ${port}
26     rm ${out}
27     rm ${tmp}/${client}
28     fi
29    
30     sleep $waitt
31     done
32     done
33    

Properties

Name Value
svn:executable *