[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: reinserting USB plug via software



Gentlemen, thank you for your answers. I have perfected:
$ cat usb-reset
#!/bin/sh
mount|grep /dev/sd && { echo 1>&2 $0: umount it first, Holmes; exit 55;}
grep uhci_hcd /proc/modules > /dev/null
case $? in 0) m=u;; 1) m=o;; esac
set -e
for i in rmmod modprobe
do for j in ${m?}hci-hcd ehci-hcd
    do $i $j
    done
    sleep 1
done


Reply to: