#!/bin/sh

set -e

PATH=/usr/sbin:$PATH
export PATH

at_exit() {
    echo "info: test exiting"
}

trap at_exit INT TERM EXIT

echo "info: PCI devices"
lspci -nn 2>&1 || true
echo "info: USB devices"
lsusb 2>&1 || true
echo "info: Running isenkram-lookup"
isenkram-lookup 2>&1
echo "info: Running isenkram-autoinstall-firmware"
if isenkram-autoinstall-firmware 2>&1 ; then
    :
else
    echo "info: isenkram-autoinstall-firmware exited with error code $! - no firmware to install?"
fi
