#!/bin/sh

print_feedback_state()
{
    echo "QA feedback for USB: " $1
    echo ""
}

seperator()
{
    echo ""
}

run_command()
{
    print_feedback_state "$1" && $1 && seperator || print_feedback_state "FAIL in '$1'"
}

print_feedback_state "started"

run_command "ps"
run_command "cli query sysmgr-0:fwversion"
run_command "cli query sysmgr-0:productname"
run_command "cli query sysmgr-0:productid"
run_command "cli query sysmgr-0:productboardtype"
run_command "cat /proc/bus/usb/devices"
run_command "ls -l /dev/sd*"
run_command "blkid"
run_command "mount"
run_command "cli query usbhost_mngr-0:disk_mount_list"
run_command "cli query usbhost_mngr-0:device_list"
run_command "cli query samba_mngr-0:connection_list"
run_command "cli query sntp-0:internet_connection"
run_command "cli query usbhost_mngr-0:freespace_percent_limit"
run_command "ps"

print_feedback_state "completed"
