Magellan Linux

Diff of /trunk/usbip/usbippolld-sql

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 174 by niro, Wed May 9 15:05:23 2007 UTC revision 179 by niro, Thu May 10 14:13:41 2007 UTC
# Line 1  Line 1 
1  #!/bin/bash  #!/bin/bash
2    
 SQL_USER=jomo  
 SQL_PASS=j0m0  
 SQL_HOST=128.20.41.110  
 SQL_DB=jomo  
   
3  source /etc/conf.d/usbippolld  source /etc/conf.d/usbippolld
4  source /home/rogalla/cvsroot/alx-src/alxconfig-ng/functions/mysqlfunctions  source /usr/lib/alxconfig-ng/functions/mysqlfunctions
5    
6  while true  while true
7  do  do
# Line 14  do Line 9  do
9    
10   for client in ${ALLCLIENTS}   for client in ${ALLCLIENTS}
11   do   do
 # BUSID=$(mysqldo "select busid from clients where ip='${client}'")  
 #  
 # if fping -q ${FPING_OPTS} ${client}  
 # then  
 # echo "-- polling client ${client} on dev ${BUSID}"  
 # usbip -a ${client} ${BUSID}  
 # else  
 # echo "-- client ${client} not found, removing from list"  
 #  
 # out=$(mktemp)  
 # port=$(usbip -p &> ${out};grep -B3 -i "128.20.3.3" ${out}  | grep Port | cut -d' '  -f2| sed "s|:||")  
 # usbip -d ${port}  
 # mysqldo "delete from clients where ip='${client}'"  
 # fi  
   
   
12   if [[ $(mysqldo "select connected from clients where ip='${client}'") = 1 ]]   if [[ $(mysqldo "select connected from clients where ip='${client}'") = 1 ]]
13   then   then
14   BUSID=$(mysqldo "select busid from clients where ip='${client}'")   BUSID=$(mysqldo "select busid from clients where ip='${client}'")

Legend:
Removed from v.174  
changed lines
  Added in v.179