--- trunk/usbip/usbippolld-sql 2007/05/09 15:05:23 174 +++ trunk/usbip/usbippolld-sql 2007/05/10 14:13:41 179 @@ -1,12 +1,7 @@ #!/bin/bash -SQL_USER=jomo -SQL_PASS=j0m0 -SQL_HOST=128.20.41.110 -SQL_DB=jomo - source /etc/conf.d/usbippolld -source /home/rogalla/cvsroot/alx-src/alxconfig-ng/functions/mysqlfunctions +source /usr/lib/alxconfig-ng/functions/mysqlfunctions while true do @@ -14,22 +9,6 @@ for client in ${ALLCLIENTS} 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 - - if [[ $(mysqldo "select connected from clients where ip='${client}'") = 1 ]] then BUSID=$(mysqldo "select busid from clients where ip='${client}'")