On Friday 2009 January 23 12:55:23 jida...@jidanni.org wrote:
>I have perfected:

Bold claim!

>$ cat usb-reset
>#!/bin/sh
>mount|grep /dev/sd && { echo 1>&2 $0: umount it first, Holmes; exit 55;}

It will always error on both of my systems, having /dev/sda1 (internal SATA 
drive) mounted as /boot.

>grep uhci_hcd /proc/modules > /dev/null
>case $? in 0) m=u;; 1) m=o;; esac

How about:
m=o; grep -q uhci_hcd /proc/modules && m=u
which does mostly the same thing.

Also, this falls apart on my desktop that needs all *three* usb modules loaded 
for all the ports to work.  (Yes, this did cause me no end to trouble as uhci 
and ohci have not always played as well together as they do now.)

Not perfect, but quite usable.
-- 
Boyd Stephen Smith Jr.                     ,= ,-_-. =. 
b...@iguanasuicide.net                     ((_/)o o(\_))
ICQ: 514984 YM/AIM: DaTwinkDaddy           `-'(. .)`-' 
http://iguanasuicide.net/                      \_/     

Attachment: signature.asc
Description: This is a digitally signed message part.

Reply via email to