Magellan Linux

Diff of /trunk/usbip/usbipdevd2

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

revision 1537 by niro, Mon Sep 19 17:55:43 2011 UTC revision 1538 by niro, Mon Sep 19 18:53:59 2011 UTC
# Line 10  source /etc/conf.d/usbipdevd Line 10  source /etc/conf.d/usbipdevd
10  # version 0.1.7, no parseable list cmd  # version 0.1.7, no parseable list cmd
11  if [[ -x /usr/bin/bind_driver ]]  if [[ -x /usr/bin/bind_driver ]]
12  then  then
13   BINDCMD="/usr/bin/bind_driver "   BINDCMD="/usr/bin/bind_driver"
14  else  else
15   BINDCMD="/usr/sbin/usbip_bind_driver"   BINDCMD="/usr/sbin/usbip_bind_driver"
16  fi  fi
17    
18  while true  while true
19  do  do
20   # version 0.1.7, no parseable list cmd   # version =<0.1.7 has no parseable list cmd
21   if [[ ${BINDCMD} = /usr/bin/bind_driver ]]   if [[ -z $(${BINDCMD} --help | grep -- --list2) ]]
22   then   then
23   BUSID=$(${BINDCMD} --list | grep -i "${USBIP_DEVICE_ID}" | sed 's:.*busid\ \([0-9].*\)\ (.*:\1:') # sanitizing syntax-highlighting )   BUSID=$(${BINDCMD} --list | grep -i "${USBIP_DEVICE_ID}" | sed 's:.*busid\ \([0-9].*\)\ (.*:\1:') # sanitizing syntax-highlighting )
24   BUSBINDING=$(${BINDCMD} --list | grep -A1 "${USBIP_DEVICE_ID}" | grep -- '->' | sed 's:.*->\ \(.*\):\1:')   BUSBINDING=$(${BINDCMD} --list | grep -A1 "${USBIP_DEVICE_ID}" | grep -- '->' | sed 's:.*->\ \(.*\):\1:')
25   else   else
26   BUSID=$(${BINDCMD} --list | grep "${USBIP_DEVICE_ID}"  | cut -d'#' -f1 | sed 's:.*=\(.*\):\1:')   BUSID=$(${BINDCMD} --list2 | grep "${USBIP_DEVICE_ID}"  | cut -d'#' -f1 | sed 's:.*=\(.*\):\1:')
27   BUSBINDING=$(${BINDCMD} --list | grep "${USBIP_DEVICE_ID}" | cut -d'#' -f3 | sed 's:.*=\(.*\):\1:')   BUSBINDING=$(${BINDCMD} --list2 | grep "${USBIP_DEVICE_ID}" | cut -d'#' -f3 | sed 's:.*=\(.*\):\1:')
28   fi   fi
29    
30   if [[ -n ${BUSID} ]]   if [[ -n ${BUSID} ]]

Legend:
Removed from v.1537  
changed lines
  Added in v.1538