7 if [ "$1" != "configure" ]; then
12 # Activate any unactivated USRPs that are plugged in at install time.
13 # This is basically a duplication of the loop in /etc/hotplug/usb.rc,
14 # but Md claims it's the best solution for synthesizing hotplug events
15 # for the USRPs plugged in at installation time.
19 # Don't bother doing this unless we have all the firmware we need, and
20 # /sbin/hotplug working. (Rationale: If we don't have hotplug working,
21 # this will not work next boot/plugin anyhow, so it would be very confusing
22 # for the user to have it all work up _until_ the next boot/plugin.)
24 [ -r /usr/share/usrp/rev2/std_4rx_0tx.rbf ] || exit 0
25 [ -x /sbin/hotplug ] || [ -x /sbin/udevd ] || exit 0
27 # We need sysfs to do this.
28 [ -d /sys/bus/usb/devices/ ] || exit 0
30 # Go through all USB devices and find unconfigured USRPs (ie. FX2 chips).
31 for device in /sys/bus/usb/devices/[0-9]*:*; do
32 devlink=$(readlink -f $device)
33 DEVPATH=${devlink#/sys}
35 [ -f $devlink/../idVendor ] || continue
36 PRODUCT="$(cat $devlink/../idVendor)/$(cat $devlink/../idProduct)/$(cat $devlink/../bcdDevice)"
38 if [ "$PRODUCT" = "fffe/0002/0002" ] || [ "$PRODUCT" = "fffe/0002/0004" ]; then
39 /usr/bin/usrper load_standard_bits