#!/bin/sh a="$1" shift #echo $a echo "set_config 255 set_config 0 dump_all_config_desc power_off power_on" if [ "$a" = "" ]; then (( usbconfig list |sort ) || usbdevs -vd ) && exit 0 fi if [ "$a" = "hub" ]; then $0 if | grep -i hub elif [ "$a" = "root" ]; then $0 | grep -i root elif [ "$a" = "e0" ]; then sysctl hw.usb.disable_enumeration=1 elif [ "$a" = "e1" ]; then sysctl hw.usb.disable_enumeration=0 elif [ "$a" = "e" ]; then sysctl hw.usb.disable_enumeration=0 elif [ "$a" = "if" -o "$a" = "drv" -o "$a" = "ifdrv" ]; then usbconfig show_ifdrv elif [ "$*" = "" ]; then usbconfig -d $a dump_device_desc show_ifdrv || usbdevs -vd else usbconfig -d $a $@ fi